]> git.pld-linux.org Git - packages/stunnel.git/commitdiff
- fixed force-reload not to start service if not running, added try-restart
authorJakub Bogusz <qboosh@pld-linux.org>
Tue, 27 May 2008 20:40:28 +0000 (20:40 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    stunnel.init -> 1.8

stunnel.init

index 82a75cb66a94eeab5cf2c850abd2c841eeefc344..e4ca5f84b76661bacfa1f448f75f6e7b940f3119 100644 (file)
@@ -56,6 +56,16 @@ stop() {
        fi
 }
 
+condrestart() {
+       if [ -f /var/lock/subsys/stunnel ]; then
+               stop
+               start
+       else
+               msg_not_running stunnel
+               RETVAL=$1
+       fi
+}
+
 RETVAL=0
 # See how we were called.
 case "$1" in
@@ -65,16 +75,22 @@ case "$1" in
   stop)
        stop
        ;;
-  restart|force-reload)
+  restart)
        stop
        start
        ;;
+  try-restart)
+       condrestart 0
+       ;;
+  force-reload)
+       condrestart 7
+       ;;
   status)
        status stunnel
        exit $?
        ;;
   *)
-       msg_usage "$0 {start|stop|restart|force-reload|status}"
+       msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"
        exit 3
 esac
 
This page took 0.070447 seconds and 4 git commands to generate.