]> git.pld-linux.org Git - packages/apache.git/blobdiff - apache.init
- unify apache initscripts
[packages/apache.git] / apache.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
        ;;
This page took 0.040695 seconds and 4 git commands to generate.