updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / lirc-bede / irexecd
bloba64b033a5bd3bd94431b1b41e92f163c52d2205a
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
5 . /etc/conf.d/irexec.conf
7 PID=`pidof -o %PPID /usr/bin/irexec`
8 case "$1" in
9 start)
10 stat_busy "Starting IREXEC Daemon"
11 [ -z "$PID" ] && /usr/bin/irexec --daemon $IREXEC_OPTS
12 if [ $? -gt 0 ]; then
13 stat_fail
14 else
15 add_daemon irexecd
16 stat_done
19 stop)
20 stat_busy "Stopping IREXEC Daemon"
21 [ ! -z "$PID" ] && kill $PID &> /dev/null
22 if [ $? -gt 0 ]; then
23 stat_fail
24 else
25 rm_daemon irexecd
26 stat_done
29 restart)
30 $0 stop
31 sleep 1
32 $0 start
35 echo "usage: $0 {start|stop|restart}"
36 esac
37 exit 0