aboutsummaryrefslogtreecommitdiffstats
path: root/testing/openxcap/openxcap.initd
diff options
context:
space:
mode:
Diffstat (limited to 'testing/openxcap/openxcap.initd')
-rw-r--r--testing/openxcap/openxcap.initd31
1 files changed, 31 insertions, 0 deletions
diff --git a/testing/openxcap/openxcap.initd b/testing/openxcap/openxcap.initd
new file mode 100644
index 0000000000..03286cce3d
--- /dev/null
+++ b/testing/openxcap/openxcap.initd
@@ -0,0 +1,31 @@
+#!/sbin/runscript
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+
+INSTALL_DIR="/usr/bin"
+RUNTIME_DIR="/var/run/openxcap"
+DEFAULTS="/etc/default/openxcap"
+SERVER="$INSTALL_DIR/openxcap"
+PID="$RUNTIME_DIR/openxcap.pid"
+OPTIONS=""
+NAME="openxcap"
+DESC="OpenXCAP server"
+
+depend() {
+ need net
+ after firewall
+}
+
+start() {
+ ebegin "Starting $DESC: $NAME "
+ start-stop-daemon --start --quiet --pidfile $PID --exec $SERVER -- $OPTIONS
+ eend $?
+}
+
+stop () {
+ ebegin -n "Stopping $DESC: $NAME "
+ start-stop-daemon --stop --quiet --oknodo --signal 15 --pidfile $PID
+ eend $?
+}
+
+exit 0
+