Author: glen                         Date: Wed Nov 26 20:45:24 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- add try-restart; fix force-reload

---- Files affected:
SOURCES:
   nagios-nsca.init (1.6 -> 1.7) 

---- Diffs:

================================================================
Index: SOURCES/nagios-nsca.init
diff -u SOURCES/nagios-nsca.init:1.6 SOURCES/nagios-nsca.init:1.7
--- SOURCES/nagios-nsca.init:1.6        Wed Dec 20 01:25:57 2006
+++ SOURCES/nagios-nsca.init    Wed Nov 26 21:45:19 2008
@@ -50,6 +50,16 @@
        fi
 }
 
+condrestart() {
+       if [ -f /var/lock/subsys/nagios-nsca ]; then
+               stop
+               start
+       else
+               msg_not_running "Nagios NSCA daemon"
+               RETVAL=$1
+       fi
+}
+
 RETVAL=0
 # See how we were called.
 case "$1" in
@@ -59,16 +69,22 @@
   stop)
        stop
        ;;
-  restart|force-reload)
+  restart)
        stop
        start
        ;;
+  try-restart)
+       condrestart 0
+       ;;
+  force-reload)
+       condrestart 7
+       ;;
   status)
        status nsca
        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/nagios-nsca.init?r1=1.6&r2=1.7&f=u

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

Reply via email to