updated on Thu Jan 19 20:01:47 UTC 2012
[aur-mirror.git] / scrobby-git / scrobby.init
blob8c0f0300b1cd4fe1e93bd15d1965062720a5357e
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 PID=`pidof -o %PPID /usr/bin/scrobby`
7 case "$1" in
8 start)
9 stat_busy "Starting Scrobby"
10 /usr/bin/scrobby
11 if [ $? -gt 0 ]; then
12 stat_fail
13 else
14 stat_done
15 add_daemon scrobby
19 stop)
20 stat_busy "Stoping Scrobby"
21 [ ! -z "$PID" ] && kill $PID &> /dev/null
22 if [ $? -gt 0 ]; then
23 stat_fail
24 else
25 stat_done
26 rm_daemon scrobby
29 restart)
30 $0 stop
31 sleep 1
32 $0 start
35 echo "usage: $0 {start|stop|restart}"
36 esac