updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / randomsound / randomsound.init
blob4faa9d2ea63b84f5c95e88e9e325eb68b7ce7339
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
5 . /etc/conf.d/randomsound
7 PID=`pidof -o %PPID /usr/sbin/randomsound`
8 case "$1" in
9 start)
10 stat_busy "Starting randomsound Daemon"
11 [ -z "$PID" ] && /usr/sbin/randomsound $RANDOMSOUND_OPTS &>/dev/null
12 if [ $? -gt 0 ]; then
13 stat_fail
14 else
15 add_daemon randomsound
16 stat_done
19 stop)
20 stat_busy "Stopping randomsound Daemon"
21 [ ! -z "$PID" ] && kill $PID &> /dev/null
22 if [ $? -gt 0 ]; then
23 stat_fail
24 else
25 rm_daemon randomsound
26 stat_done
29 restart)
30 $0 stop
31 sleep 3
32 $0 start
35 echo "usage: $0 {start|stop|restart}"
36 esac
37 exit 0
38 # vim: ft=sh ts=2 sw=2