updated on Wed Jan 11 12:00:27 UTC 2012
[aur-mirror.git] / htun / htund
blob520a43e0dde1927e0c9845e4922c5d120552227d
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 case "$1" in
7 start)
8 stat_busy "Starting HTun Daemon"
9 if ck_daemon htund && /usr/bin/htund &> /dev/null; then
10 add_daemon htund
11 stat_done
12 else
13 stat_fail
14 fi;;
15 stop)
16 stat_busy "Stopping HTun Daemon"
17 if pkill -f /usr/bin/htund && ! pgrep -f /usr/bin/htund > /dev/null; then
18 rm_daemon htund
19 stat_done
20 else
21 stat_fail
22 fi;;
23 restart)
24 $0 stop
25 sleep 1
26 $0 start;;
28 echo "usage: $0 {start|stop|restart}"
29 esac
30 exit 0