updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / igmpproxy / igmpproxy.rc.d
blobd639d142610ae1fef347d0b0b8e33397c31679b2
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 PID=`pidof -o %PPID /usr/sbin/igmpproxy`
7 case "$1" in
8 start)
9 stat_busy "Starting igmpproxy routing daemon"
10 if [ -z "$PID" ]; then
11 /usr/sbin/igmpproxy /etc/igmpproxy.conf &
13 if [ ! -z "$PID" -o $? -gt 0 ]; then
14 stat_fail
15 else
16 disown
17 add_daemon igmpproxy
18 stat_done
21 stop)
22 stat_busy "Stopping igmpproxy routing daemon"
23 [ ! -z "$PID" ] && kill $PID &>/dev/null
24 if [ $? -gt 0 ]; then
25 stat_fail
26 else
27 rm_daemon igmpproxy
28 stat_done
31 restart)
32 $0 stop
33 sleep 1
34 $0 start
37 echo "usage: $0 {start|stop|restart}"
38 esac