]> git.pld-linux.org Git - packages/apache.git/commitdiff
- unify apache initscripts
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 15 Oct 2008 12:48:51 +0000 (12:48 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    apache.init -> 1.62
    apache1.init -> 1.29

apache.init
apache1.init

index 80cd971282b747065058b06678d1bdbb525c8848..169ec3fa49579130193d4359e94e05cc1ac84a61 100644 (file)
@@ -41,6 +41,7 @@ fi
 
 configtest() {
        /usr/sbin/httpd.${HTTPD_MPM} -t $CFG $HTTPD_OPTS >/dev/null 2>&1
+       RETVAL=$?
 }
 
 start() {
@@ -100,7 +101,6 @@ case "$1" in
   reload|force-reload|graceful)
        if [ -f /var/lock/subsys/httpd ]; then
                configtest
-               RETVAL=$?
                if [ $RETVAL -eq 0 ]; then
                        msg_reloading httpd.${HTTPD_MPM}
                        busy
@@ -118,14 +118,13 @@ case "$1" in
                msg_reloading httpd.${HTTPD_MPM}
 
                configtest
-               RETVAL=$?
                if [ $RETVAL -eq 0 ]; then
                        /usr/sbin/httpd.${HTTPD_MPM} $CFG -k graceful
                        RETVAL=$?
                        [ $RETVAL -eq 0 ] && ok || fail
                else
                        fail
-                       echo >&2 "Configuration file syntax test failed."
+                       echo >&2 "Configuration file syntax test failed. Run $0 configtest to see errors."
                fi
        fi
        ;;
index cdcfe019762fbad0a5cad9f96d4e9ebe6f7998a7..5503f205ff94d83ec1753675060c2507e3849968 100644 (file)
@@ -87,13 +87,13 @@ restart() {
                start
        else
                fail
-               echo >&2 "Configuration file syntax test failed."
+               echo >&2 "Configuration file syntax test failed. Run $0 configtest to see errors."
        fi
 }
 
 reload() {
-       sig=${1:-HUP}
-       retnr=${2:-7}
+       local sig=${1:-HUP}
+       local retnr=${2:-7}
        if [ -f /var/lock/subsys/apache ]; then
                msg_reloading apache
 
@@ -103,7 +103,7 @@ reload() {
                        RETVAL=$?
                else
                        fail
-                       echo >&2 "Configuration file syntax test failed."
+                       echo >&2 "Configuration file syntax test failed. Run $0 configtest to see errors."
                fi
        else
                msg_not_running apache
@@ -120,11 +120,6 @@ case "$1" in
   stop)
        stop
        ;;
-  status)
-       status apache
-       RETVAL=$?
-       /usr/sbin/apache -S
-       ;;
   restart)
        restart
        ;;
@@ -147,6 +142,11 @@ case "$1" in
   configtest)
        /usr/sbin/apache -t
        ;;
+  status)
+       status apache
+       RETVAL=$?
+       /usr/sbin/apache -S
+       ;;
   *)
        msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|graceful|configtest|status}"
        exit 3
This page took 0.059071 seconds and 4 git commands to generate.