aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained/openxcap/openxcap.initd
blob: 7a2f667e1bf527dac459ea43a5db499aa3e05518 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/sbin/openrc-run
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