updated on Mon Jan 16 00:01:41 UTC 2012
[aur-mirror.git] / murmur-ice / murmur.rc.d
blob7a41e77da7cc5c19354a6bcd99e2f63a6f40d048
1 #!/bin/bash
3 CONF=/etc/conf.d/murmur
5 . /etc/rc.conf
6 . /etc/rc.d/functions
8 [ -f $CONF ] && . $CONF
10 PID=$(pidof -o %PPID /usr/sbin/murmurd)
11 case "$1" in
12 start)
13 stat_busy "Starting murmur"
14 [ -z "$PID" ] && /usr/sbin/murmurd $PARAMS
15 if [ $? -gt 0 ]; then
16 stat_fail
17 else
18 add_daemon murmur
19 stat_done
22 stop)
23 stat_busy "Stopping murmur"
24 [ ! -z "$PID" ] && kill $PID &> /dev/null
25 if [ $? -gt 0 ]; then
26 stat_fail
27 else
28 rm_daemon murmur
29 stat_done
32 restart)
33 $0 stop
34 sleep 1
35 $0 start
38 echo "usage: $0 {start|stop|restart}"
39 esac
40 exit 0