updated on Mon Jan 23 12:00:23 UTC 2012
[aur-mirror.git] / xmms2-git / xmms2d.rc
blobaf931ec0ac3e164f52fa12311d3d5d60c7d543ef
1 #!/bin/bash
3 . /etc/conf.d/xmms2d.conf
4 . /etc/rc.conf
5 . /etc/rc.d/functions
7 PID=`pidof xmms2d xmms2-et`
8 case "$1" in
9 start)
10 stat_busy "Starting xmms2d"
11 [ -z "$PID" ] && su -c 'xmms2-launcher $XMMS2_PARAMETERS 1>/dev/null 2>/dev/null' - $XMMS2_USER
12 if [ $? -gt 0 ]; then
13 stat_fail
14 else
15 add_daemon xmms2d
16 stat_done
19 stop)
20 stat_busy "Stopping xmms2d"
21 [ ! -z "$PID" ] && kill $PID &> /dev/null
22 if [ $? -gt 0 ]; then
23 stat_fail
24 else
25 rm_daemon xmms2d
26 stat_done
29 restart)
30 $0 stop
31 $0 start
34 echo "usage: $0 {start|stop|restart}"
35 esac
36 exit 0