updated on Tue Jan 10 04:01:21 UTC 2012
[aur-mirror.git] / fwknop / fwknopd.rc
bloba4ae176fea65375833adeb0422c668fc5b5e698c
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 DAEMON=fwknopd
8 CONFIG_FILE=/etc/fwknop/fwknopd.conf
9 ACCESS_FILE=/etc/fwknop/access.conf
11 case "$1" in
12 start)
13 stat_busy "Starting $DAEMON"
14 /usr/sbin/fwknopd -c $CONFIG_FILE -a $ACCESS_FILE
15 if [ $? -gt 0 ]; then
16 stat_fail
17 else
18 add_daemon $DAEMON
19 stat_done
23 stop)
24 stat_busy "Stopping $DAEMON"
25 /usr/sbin/fwknopd -c $CONFIG_FILE -K
26 if [ $? -gt 0 ]; then
27 stat_fail
28 else
29 rm_daemon $DAEMON
30 stat_done
34 restart)
35 $0 stop
36 sleep 1
37 $0 start
40 status)
41 /usr/sbin/fwknopd -c $CONFIG_FILE -S
42 stat_done
46 echo "usage: $0 {start|stop|restart|status}"
47 esac
49 exit 0