Author: glen                         Date: Sun Oct  1 21:40:07 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- use functions

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

---- Diffs:

================================================================
Index: SOURCES/apache.init
diff -u SOURCES/apache.init:1.55 SOURCES/apache.init:1.56
--- SOURCES/apache.init:1.55    Wed Aug 30 16:47:21 2006
+++ SOURCES/apache.init Sun Oct  1 23:40:01 2006
@@ -39,10 +39,7 @@
        fi
 fi
 
-RETVAL=0
-# See how we were called.
-case "$1" in
-  start)
+start() {
        # Check if the service is already running?
        if [ ! -f /var/lock/subsys/httpd ]; then
                msg_starting httpd.${HTTPD_MPM}
@@ -52,8 +49,9 @@
        else
                msg_already_running httpd.${HTTPD_MPM}
        fi
-       ;;
-  stop)
+}
+
+stop() {
        # Stop daemons.
        if [ -f /var/lock/subsys/httpd ]; then
                msg_stopping httpd.${HTTPD_MPM}
@@ -62,6 +60,16 @@
        else
                msg_not_running httpd.${HTTPD_MPM}
        fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+       start
+       ;;
+  stop)
+       stop
        ;;
   status)
        status httpd.${HTTPD_MPM}
@@ -69,8 +77,8 @@
        /usr/sbin/httpd.${HTTPD_MPM} $CFG -S
        ;;
   restart)
-       $0 stop
-       $0 start
+       stop
+       start
        ;;
   reload|force-reload|graceful)
        if [ -f /var/lock/subsys/httpd ]; then
================================================================

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

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

Reply via email to