SOURCES: perlbal.init - added try-restart action
qboosh
qboosh at pld-linux.org
Fri Jan 4 02:35:15 CET 2008
Author: qboosh Date: Fri Jan 4 01:35:15 2008 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- added try-restart action
---- Files affected:
SOURCES:
perlbal.init (1.1 -> 1.2)
---- Diffs:
================================================================
Index: SOURCES/perlbal.init
diff -u SOURCES/perlbal.init:1.1 SOURCES/perlbal.init:1.2
--- SOURCES/perlbal.init:1.1 Sun Sep 16 19:14:25 2007
+++ SOURCES/perlbal.init Fri Jan 4 02:35:09 2008
@@ -51,6 +51,16 @@
fi
}
+condrestart() {
+ if [ -f /var/lock/subsys/perlbal ]; then
+ stop
+ start
+ else
+ msg_not_running perlbal
+ RETVAL=$1
+ fi
+}
+
reload() {
if [ -f /var/lock/subsys/perlbal ]; then
msg_reloading perlbal
@@ -75,20 +85,18 @@
stop
start
;;
- reload)
- reload
+ try-restart)
+ condrestart 0
;;
-# ONLY if program allows reloading without stopping
-# otherwise include force-reload with 'reload'
- force-reload)
- reload
+ reload|force-reload)
+ reload
;;
status)
status perlbal
RETVAL=$?
;;
*)
- msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
+ msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|status}"
exit 3
esac
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/perlbal.init?r1=1.1&r2=1.2&f=u
More information about the pld-cvs-commit
mailing list