Author: qboosh                       Date: Tue May 27 20:40:34 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- fixed force-reload not to start service if not running, added try-restart

---- Files affected:
SOURCES:
   stunnel.init (1.7 -> 1.8) 

---- Diffs:

================================================================
Index: SOURCES/stunnel.init
diff -u SOURCES/stunnel.init:1.7 SOURCES/stunnel.init:1.8
--- SOURCES/stunnel.init:1.7    Mon Dec  4 13:58:44 2006
+++ SOURCES/stunnel.init        Tue May 27 22:40:28 2008
@@ -56,6 +56,16 @@
        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 @@
   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
 
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/stunnel.init?r1=1.7&r2=1.8&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to