Author: qboosh                       Date: Fri Oct 24 16:15:40 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- added try-restart

---- Files affected:
SOURCES:
   radsecproxy.init (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: SOURCES/radsecproxy.init
diff -u SOURCES/radsecproxy.init:1.1 SOURCES/radsecproxy.init:1.2
--- SOURCES/radsecproxy.init:1.1        Fri Oct 24 12:25:26 2008
+++ SOURCES/radsecproxy.init    Fri Oct 24 18:15:35 2008
@@ -11,7 +11,6 @@
 #              executable on Linux is only about 48 Kb, and it uses about 64 
Kb \
 #              (depending on the number of peers) while running. \
 
-
 # Source function library
 . /etc/rc.d/init.d/functions
 
@@ -58,23 +57,33 @@
        fi
 }
 
+condrestart() {
+       if [ -f /var/lock/subsys/cpqarrayd ]; then
+               checkconfig
+               stop
+               start
+       else
+               msg_not_running cpqarrayd
+               RETVAL=$1
+       fi
+}
+
 RETVAL=0
 # See how we were called.
 case "$1" in
   start)
-       start
+       start
        ;;
   stop)
-       stop
+       stop
        ;;
   restart)
        checkconfig
        stop
        start
        ;;
-  status)
-       status radsecproxy
-       exit $?
+  try-restart)
+       condrestart 0
        ;;
   reload|force-reload)
        if [ -f /var/lock/subsys/radsecproxy ]; then
@@ -87,8 +96,12 @@
                exit 7
        fi
        ;;
+  status)
+       status radsecproxy
+       exit $?
+       ;;
   *)
-       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/radsecproxy.init?r1=1.1&r2=1.2&f=u

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

Reply via email to