Author: qboosh                       Date: Sat Jan 26 12:43:01 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- added try-restart action (LSB 3.1)
- removed duplicate force-reload code

---- Files affected:
SOURCES:
   apache.init (1.56 -> 1.57) 

---- Diffs:

================================================================
Index: SOURCES/apache.init
diff -u SOURCES/apache.init:1.56 SOURCES/apache.init:1.57
--- SOURCES/apache.init:1.56    Sun Oct  1 23:40:01 2006
+++ SOURCES/apache.init Sat Jan 26 13:42:55 2008
@@ -62,6 +62,16 @@
        fi
 }
 
+condrestart() {
+       if [ -f /var/lock/subsys/httpd ]; then
+               stop
+               start
+       else
+               msg_not_running httpd.${HTTPD_MPM}
+               RETVAL=$1
+       fi
+}
+
 RETVAL=0
 # See how we were called.
 case "$1" in
@@ -80,6 +90,9 @@
        stop
        start
        ;;
+  try-restart)
+       condrestart 0
+       ;;
   reload|force-reload|graceful)
        if [ -f /var/lock/subsys/httpd ]; then
                run_cmd "Checking httpd.${HTTPD_MPM} configuration" 
httpd.${HTTPD_MPM} $CFG -t
@@ -109,24 +122,8 @@
                fi
        fi
        ;;
-  force-reload)
-       if [ -f /var/lock/subsys/httpd ]; then
-               run_cmd "Checking httpd.${HTTPD_MPM} configuration" 
httpd.${HTTPD_MPM} $CFG -t
-               RETVAL=$?
-               if [ $RETVAL -eq 0 ]; then
-                       msg_reloading httpd.${HTTPD_MPM}
-                       # forced reload
-                       daemon httpd.${HTTPD_MPM} $CFG -k restart
-                       RETVAL=$?
-               fi
-       else
-               msg_not_running httpd.${HTTPD_MPM}
-               RETVAL=7
-       fi
-       ;;
-
   *)
-       msg_usage "$0 {start|stop|restart|reload|force-reload|graceful|status}"
+       msg_usage "$0 
{start|stop|restart|try-restart|reload|force-reload|graceful|status}"
        exit 3
        ;;
 esac
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/apache.init?r1=1.56&r2=1.57&f=u

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

Reply via email to