aboutsummaryrefslogtreecommitdiff
path: root/net/neubot/files
diff options
context:
space:
mode:
authorThierry Thomas <thierry@FreeBSD.org>2011-10-22 14:39:17 +0000
committerThierry Thomas <thierry@FreeBSD.org>2011-10-22 14:39:17 +0000
commit76112f209b2c65873cdee879ab08858e0070715f (patch)
tree5d59856726ac1a3de4413ecf029c78c513c60c54 /net/neubot/files
parenta90bd9730feed757ea478626f4d44ebbff5137f1 (diff)
downloadports-76112f209b2c65873cdee879ab08858e0070715f.tar.gz
ports-76112f209b2c65873cdee879ab08858e0070715f.zip
Notes
Diffstat (limited to 'net/neubot/files')
-rw-r--r--net/neubot/files/neubotd.in47
-rw-r--r--net/neubot/files/patch-Makefile23
-rw-r--r--net/neubot/files/pkg_message.in9
3 files changed, 79 insertions, 0 deletions
diff --git a/net/neubot/files/neubotd.in b/net/neubot/files/neubotd.in
new file mode 100644
index 000000000000..bdb4d0973f3c
--- /dev/null
+++ b/net/neubot/files/neubotd.in
@@ -0,0 +1,47 @@
+#! /bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: neubotd
+# REQUIRE: NETWORKING DAEMON
+# KEYWORD: shutdown
+
+# Add the following line to /etc/rc.conf to enable `neubotd':
+#
+#neubotd_enable="YES"
+#
+
+. /etc/rc.subr
+
+name="neubotd"
+rcvar=`set_rcvar`
+
+# read settings, set default values
+load_rc_config "${name}"
+: ${neubotd_enable="NO"}
+
+required_files="%%PREFIX%%/bin/neubot"
+pidfile="/var/run/${name}.pid"
+long_name="neubot daemon."
+neubotd_log="/var/log/${name}.log"
+
+start_cmd=${name}_start
+stop_cmd=${name}_stop
+
+neubotd_start() {
+ [ -x %%PYTHON_CMD%% ] || (echo "%%PYTHON_CMD%% not found"; exit 1)
+ [ -f $pidfile ] && (echo "$name already running?"; exit 2)
+ echo "Starting $long_name"
+ %%PYTHON_CMD%% %%PREFIX%%/bin/neubot start > $neubotd_log && \
+ echo $$ > $pidfile
+}
+
+neubotd_stop() {
+ [ -f $pidfile ] || (echo "$name not running?"; exit 1)
+ echo "Stopping $long_name"
+ %%PYTHON_CMD%% %%PREFIX%%/bin/neubot stop > $neubotd_log && \
+ rm -f $pidfile
+}
+
+run_rc_command "$1"
diff --git a/net/neubot/files/patch-Makefile b/net/neubot/files/patch-Makefile
new file mode 100644
index 000000000000..b854845b386c
--- /dev/null
+++ b/net/neubot/files/patch-Makefile
@@ -0,0 +1,23 @@
+--- Makefile.orig 2011-09-19 13:28:35.000000000 +0200
++++ Makefile 2011-10-22 15:07:25.000000000 +0200
+@@ -177,9 +177,9 @@
+ done
+
+ _install_autostart:
+- @$(INSTALL) -d $(DESTDIR)/etc/xdg/autostart/
++ @$(INSTALL) -d $(DESTDIR)$(PREFIX)/etc/xdg/autostart/
+ @$(INSTALL) unix_root/etc/xdg/autostart/neubot-on-gui-login.desktop \
+- $(DESTDIR)/etc/xdg/autostart
++ $(DESTDIR)$(PREFIX)/etc/xdg/autostart
+
+ #
+ # After the install we need to edit the following files to
+@@ -194,7 +194,7 @@
+ NEEDEDIT += $(DESTDIR)$(MENUDIR)/neubot-status-icon.desktop
+ NEEDEDIT += $(DESTDIR)$(MENUDIR)/neubot-web-ui.desktop
+ NEEDEDIT += $(DESTDIR)$(MENUDIR)/neubot.desktop
+-NEEDEDIT += $(DESTDIR)/etc/xdg/autostart/neubot-on-gui-login.desktop
++NEEDEDIT += $(DESTDIR)$(PREFIX)/etc/xdg/autostart/neubot-on-gui-login.desktop
+ NEEDEDIT += $(DESTDIR)$(DATADIR)/neubot/gui/infobox_gtk.py
+
+ _install_edit:
diff --git a/net/neubot/files/pkg_message.in b/net/neubot/files/pkg_message.in
new file mode 100644
index 000000000000..aebecc071eec
--- /dev/null
+++ b/net/neubot/files/pkg_message.in
@@ -0,0 +1,9 @@
+
+==============================================================================
+Please read the file %%DOCSDIR%%/PRIVACY before using this
+program.
+
+To start the daemon, add the following line to /etc/rc.conf:
+neubotd_enable="YES"
+==============================================================================
+