updated on Thu Jan 12 00:00:55 UTC 2012
[aur-mirror.git] / davemp / davempd
blob689dea928d29ab7103f905970077185508b4df4e
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
5 . /etc/conf.d/davempd
7 case "$1" in
8 start)
9 stat_busy "Starting DaveMP Daemon"
10 if ck_daemon davempd && \
11 su -l -s /bin/sh -c '/usr/bin/davempd.pl /etc/davemp.conf &> /dev/null' "${DAVEMPDUSER:-mpd}"; then
12 add_daemon davempd
13 stat_done
14 else
15 stat_fail
16 fi;;
17 stop)
18 stat_busy "Stopping DaveMP Daemon"
19 if killall davempd.pl &> /dev/null; then
20 rm_daemon davempd
21 stat_done
22 else
23 stat_fail
24 fi;;
25 restart)
26 $0 stop
27 sleep 1
28 $0 start;;
30 echo "usage: $0 {start|stop|restart}"
31 esac
32 exit 0