4 daemon_desc
="Iguanaworks USB IR daemon"
8 .
/etc
/conf.d
/$daemon_name
10 # Combine some variables into a command line
11 LOGFILE
=/var
/log
/iguanaIR.log
12 IGUANAIR_OPTIONS
="$OPTIONS --log-level=$LOGLEVEL --send-timeout=$SENDTIMEOUT --receive-timeout=$RECEIVETIMEOUT -l $LOGFILE"
15 pidof
-o %PPID igdaemon
20 stat_busy
"Starting $daemon_desc"
23 if [ -z "$PID" ]; then
24 [ -f /var
/run
/$daemon_name.pid
] && rm -f /var
/run
/$daemon_name.pid
26 igdaemon
$IGUANAIR_OPTIONS
32 echo $
(get_pid
) > /var
/run
/$daemon_name.pid
33 add_daemon
$daemon_name
43 stat_busy
"Stopping $daemon_desc"
46 [ ! -z "$PID" ] && kill $PID &> /dev
/null
52 rm -f /var
/run
/$daemon_name.pid
&> /dev
/null
53 rm_daemon
$daemon_name
65 stat_busy
"Checking $daemon_desc status";
66 ck_status
$daemon_name
70 stat_busy
"Signalling $daemon_desc"
73 [ ! -z "$PID" ] && kill -s HUP
$PID &> /dev
/null
84 echo "usage: $0 {start|stop|restart|status|rescan}"