updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / bdremote-ng / bdremote-ng.rc
blob6380f2a43aa941bc3d87e815a691cb796bc9617b
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 REMOTE_ADDRESS="00:1E:3D:11:EB:51"
8 case "$1" in
9 start)
10 stat_busy "Starting bdremote-ng ... "
11 success=0
12 /usr/sbin/bdremoteng -a $REMOTE_ADDRESS -d 1 > /var/log/bdremote-ng.log 2>&1 || success=$!
13 if [ $success -eq 0 ]; then
14 add_daemon bdremote-ng
15 stat_done
16 else
17 stat_fail
20 stop)
21 stat_busy "Stopping bdremote-ng ..."
22 killall bdremoteng >/dev/null 2>&1
23 rm_daemon bdremote-ng
24 stat_done
26 restart)
27 $0 stop
28 sleep 1
29 $0 start
32 echo "usage: $0 {start|stop|restart}"
33 esac
34 exit 0