updated on Mon Jan 16 12:07:49 UTC 2012
[aur-mirror.git] / inadyn / inadyn.rc-script
blob011a479f7b78d0ab51c7b1e4b08349a7cf8d2033
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 PID=`pidof -o %PPID /usr/sbin/inadyn`
7 case "$1" in
8 start)
9 stat_busy "Starting INADYN Daemon"
10 [ -z "$PID" ] && /usr/sbin/inadyn >>/var/log/inadyn 2>&1
11 if [ $? -gt 0 ]; then
12 stat_fail
13 else
14 PID=`pidof -o %PPID /usr/sbin/inadyn`
15 echo $PID >/var/run/inadyn.pid
16 add_daemon inadyn
17 stat_done
20 stop)
21 stat_busy "Stopping INADYN Daemon"
22 [ ! -z "$PID" ] && kill $PID &>/dev/null
23 if [ $? -gt 0 ]; then
24 stat_fail
25 else
26 rm_daemon inadyn
27 stat_done
30 restart)
31 $0 stop
32 $0 start
35 echo "usage: $0 {start|stop|restart}"
36 esac
37 exit 0