5 bin
=/usr
/bin
/xbmc-wiiremote
6 PID
=`pidof -o %PPID $bin`
10 stat_busy
"Starting wiiremote eventclient"
11 [ -z "$PID" ] && $bin &> /dev
/null
&
12 if [[ $?
-gt 0 ]]; then
15 add_daemon xbmc-wiiremote
20 stat_busy
"Stoppping wiiremote eventclient"
21 [ ! -z "$PID" ] && kill $PID &> /dev
/null
25 rm_daemon xbmc-wiiremote
31 while [ ! -z "$PID" -a -d "/proc/$PID" ]; do sleep 1; done
35 echo "usage: $0 {start|stop|restart}"