summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2013-05-18 13:39:23 -0700
committerelijah <elijah@riseup.net>2013-05-18 13:39:23 -0700
commit07beb2048ca78a48f16ae95baf3c0fd8e11612c4 (patch)
tree896a425f470e0b514d09ec628ce01ecbf9abc202
parentda52e1b46ca0648a5cecac61affbec94e87942f9 (diff)
added minimal initscript
-rwxr-xr-xdist/debian-init-script47
1 files changed, 47 insertions, 0 deletions
diff --git a/dist/debian-init-script b/dist/debian-init-script
new file mode 100755
index 0000000..da54d12
--- /dev/null
+++ b/dist/debian-init-script
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+### BEGIN INIT INFO
+# Provides: nickserver
+# Required-Start: $remote_fs $syslog
+# Required-Stop: $remote_fs $syslog
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: nickserver initscript
+# Description: Controls nickserver daemon (see https://github.com/leapcode/nickserver)
+### END INIT INFO
+
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+NAME=nickserver
+DAEMON=`which $NAME`
+
+# exit if the daemon doesn't exist
+[ -x "$DAEMON" ] || exit 0
+
+. /lib/init/vars.sh
+. /lib/lsb/init-functions
+
+if [ "$VERBOSE" != no ]; then
+ OPTIONS="--verbose"
+else
+ OPTIONS=""
+fi
+
+case "$1" in
+ start)
+ $DAEMON $OPTIONS start
+ ;;
+ stop)
+ $DAEMON $OPTIONS stop
+ ;;
+ restart)
+ $DAEMON $OPTIONS restart
+ ;;
+ status)
+ $DAEMON $OPTIONS status
+ ;;
+ *)
+ echo "Usage: /etc/init.d/$NAME {start|stop|restart|status}"
+ exit 1
+esac
+
+exit 0 \ No newline at end of file