]> git.pld-linux.org Git - packages/Perlbal.git/commitdiff
- added try-restart action
authorJakub Bogusz <qboosh@pld-linux.org>
Fri, 4 Jan 2008 01:35:09 +0000 (01:35 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    perlbal.init -> 1.2

perlbal.init

index 1e87c11151cf8e6d626c37bd2e8b2d350095211b..44962f64c24c6bd97bc05a8a5da6d1f57b8a24df 100644 (file)
@@ -51,6 +51,16 @@ stop() {
        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 @@ case "$1" in
        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
 
This page took 0.067901 seconds and 4 git commands to generate.