updated on Tue Jan 10 12:02:00 UTC 2012
[aur-mirror.git] / umurmur / umurmur.rc.d
blobbe5d0d41f8b716ae0fe195d37aca58de39213507
1 #!/bin/bash
3 CONF=/etc/conf.d/umurmur
5 . /etc/rc.conf
6 . /etc/rc.d/functions
8 [ -f $CONF ] && . $CONF
10 PID=$(pidof -o %PPID /usr/bin/umurmurd)
11 case "$1" in
12 start)
13 stat_busy "Starting umurmur"
14 [ -z "$PID" ] && /usr/bin/umurmurd $UMURMUR_ARGS
15 if [ $? -gt 0 ]; then
16 stat_fail
17 else
18 add_daemon umurmur
19 stat_done
22 stop)
23 stat_busy "Stopping umurmur"
24 [ ! -z "$PID" ] && kill $PID &> /dev/null
25 if [ $? -gt 0 ]; then
26 stat_fail
27 else
28 rm_daemon umurmur
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