3 # tvheadend tvheadend tv streaming service
7 # description: tvheadend tv streaming service
9 # processname: tvheadend
12 # Source function library
13 . /etc/rc.d/init.d/functions
16 . /etc/sysconfig/network
18 # Check that networking is up.
19 if is_yes "${NETWORKING}"; then
20 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
21 msg_network_down "tvheadend"
31 # Get service config - may override defaults
32 [ -f /etc/sysconfig/tvheadend ] && . /etc/sysconfig/tvheadend
35 # Check if the service is already running?
36 if [ -f /var/lock/subsys/tvheadend ]; then
37 msg_already_running "tvheadend"
41 msg_starting "tvheadend"
42 daemon /usr/bin/tvheadend -f -u tvheadend -g video $TVHEADEND_ARGS
44 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/tvheadend
48 if [ ! -f /var/lock/subsys/tvheadend ]; then
49 msg_not_running "tvheadend"
54 msg_stopping "tvheadend"
56 rm -f /var/lock/subsys/tvheadend
60 if [ ! -f /var/lock/subsys/tvheadend ]; then
61 msg_not_running "tvheadend"
71 # See how we were called.
94 msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"