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