]> git.pld-linux.org Git - packages/mythtv.git/commitdiff
- add try-restart, force-reload
authorElan Ruusamäe <glen@pld-linux.org>
Sat, 22 Jan 2011 21:09:41 +0000 (21:09 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    mythbackend.init -> 1.8

mythbackend.init

index f4f5211c71bf06551b091b6a24c16228f9cd869a..d19d75b7c69952221651039a1c588036031a5d1c 100644 (file)
@@ -48,6 +48,17 @@ stop() {
        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
@@ -70,6 +81,12 @@ case "$1" in
        stop
        start
        ;;
+  try-restart)
+       condrestart 0
+       ;;
+  force-reload)
+       condrestart 7
+       ;;
   flush-logs)
        flush-logs
        ;;
@@ -77,7 +94,7 @@ case "$1" in
        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
 
This page took 0.060628 seconds and 4 git commands to generate.