# Source function library.
. /etc/rc.d/init.d/functions
+MYTHTV_USER=mythtv
+OPTIONS=
+
if [ -f /etc/sysconfig/mythbackend ]; then
. /etc/sysconfig/mythbackend
fi
msg_starting "Mythbackend"
daemon /usr/sbin/mythbackend --daemon \
- --user mythtv \
+ --user $MYTHTV_USER \
--logfile /var/log/mythtv/mythbackend.log \
--pidfile $pidfile \
$OPTIONS
rm -f /var/lock/subsys/mythbackend $pidfile >/dev/null 2>&1
}
+condrestart() {
+ if [ ! -f /var/lock/subsys/mythbackend ]; then
+ msg_not_running "Mythbackend"
+ RETVAL=$1
+ return
+ fi
+
+ stop
+ start
+}
+
flush-logs() {
if [ ! -f /var/lock/subsys/mythbackend ]; then
return
stop
start
;;
+ try-restart)
+ condrestart 0
+ ;;
+ force-reload)
+ condrestart 7
+ ;;
flush-logs)
flush-logs
;;
status --pidfile $pidfile mythbackend
;;
*)
- msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
+ msg_usage "$0 {start|stop|restart|try-restart|force-reload|flush-logs|status}"
exit 3
esac