3 # mythbackend Server component of MythTV
5 # chkconfig: 2345 86 14
6 # description: Starts the mythbackend process as a daemon after the XWindows \
7 # system is started, in runlevel 5. This allows scheduled \
8 # recordings to occur without manual intervention.
9 # processname: mythbackend
10 # pidfile: /var/run/mythtv/mythbackend.pid
11 # config: /etc/sysconfig/mythbackend
13 # Source function library.
14 . /etc/rc.d/init.d/functions
19 if [ -f /etc/sysconfig/mythbackend ]; then
20 . /etc/sysconfig/mythbackend
23 pidfile=/var/run/mythtv/mythbackend.pid
27 if [ -f /var/lock/subsys/mythbackend ]; then
28 msg_already_running "Mythbackend"
32 msg_starting "Mythbackend"
33 daemon /usr/sbin/mythbackend --daemon \
35 --logfile /var/log/mythtv/mythbackend.log \
39 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/mythbackend
44 if [ ! -f /var/lock/subsys/mythbackend ]; then
45 msg_not_running "Mythbackend"
49 msg_stopping "Mythbackend"
50 killproc --pidfile mythtv/mythbackend.pid mythbackend
51 rm -f /var/lock/subsys/mythbackend $pidfile >/dev/null 2>&1
55 if [ ! -f /var/lock/subsys/mythbackend ]; then
56 msg_not_running "Mythbackend"
66 if [ ! -f /var/lock/subsys/mythbackend ]; then
70 show "Rotating %s logs" "Mythbackend"
71 killproc --pidfile $pidfile mythbackend -HUP
75 # See how we were called.
97 status --pidfile $pidfile mythbackend
100 msg_usage "$0 {start|stop|restart|try-restart|force-reload|flush-logs|status}"