3 # HTS Tvheadend daemon rc-script
7 pidfile
=/var
/run
/$daemon_name.pid
9 .
/etc
/conf.d
/tvheadend
15 stat_busy
"Starting Tvheadend daemon"
16 if [ -z `pidof -o %PPID /usr/bin/$daemon_name` ]; then
17 [ -f ${pidfile} ] && rm -f ${pidfile}
19 nice
-n -1 /usr
/bin
/$daemon_name $daemon_args
25 add_daemon
$daemon_name
35 stat_busy
"Stopping Tvheadend daemon"
37 [ -f ${pidfile} ] && kill `cat ${pidfile}` >/dev
/null
2>&1
44 rm_daemon
$daemon_name
55 echo "usage: $0 {start|stop|restart}"