updated on Sat Jan 21 04:00:54 UTC 2012
[aur-mirror.git] / rbldnsd / rc.rbldnsd
blobc771379f5a53792ee4172e999080114e9b031a53
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
5 . /etc/conf.d/rbldnsd
7 PID=$(pidof -o %PPID /usr/bin/rbldnsd)
9 case $1 in
10 start)
11 stat_busy "Starting rbldnsd"
12 [ -z "$PID" ] && /usr/bin/rbldnsd $RBLDNSD_ARGS &> /dev/null
13 if [ $? -gt 0 ]; then
14 stat_fail
15 else
16 add_daemon rbldnsd
17 stat_done
21 stop)
22 stat_busy "Stopping rbldnsd"
23 [ ! -z "$PID" ] && /bin/kill $PID &>/dev/null
24 if [ $? -gt 0 ]; then
25 stat_fail
26 else
27 rm_daemon rbldnsd
28 stat_done
32 restart)
33 $0 stop
34 $0 start
38 echo "usage: $0 {start|stop|restart}"
39 exit 1
41 esac
43 exit 0