packages: mythtv/mythbackend.init - add try-restart, force-reload
glen
glen at pld-linux.org
Sat Jan 22 22:09:46 CET 2011
Author: glen Date: Sat Jan 22 21:09:46 2011 GMT
Module: packages Tag: HEAD
---- Log message:
- add try-restart, force-reload
---- Files affected:
packages/mythtv:
mythbackend.init (1.7 -> 1.8)
---- Diffs:
================================================================
Index: packages/mythtv/mythbackend.init
diff -u packages/mythtv/mythbackend.init:1.7 packages/mythtv/mythbackend.init:1.8
--- packages/mythtv/mythbackend.init:1.7 Sat Jan 22 22:08:25 2011
+++ packages/mythtv/mythbackend.init Sat Jan 22 22:09:41 2011
@@ -48,6 +48,17 @@
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 @@
stop
start
;;
+ try-restart)
+ condrestart 0
+ ;;
+ force-reload)
+ condrestart 7
+ ;;
flush-logs)
flush-logs
;;
@@ -77,7 +94,7 @@
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
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mythtv/mythbackend.init?r1=1.7&r2=1.8&f=u
More information about the pld-cvs-commit
mailing list