]> git.pld-linux.org Git - packages/apache.git/commitdiff
- check config before doing apache restart auto/ac/apache1-1_3_34-3 auto/ac/apache1-1_3_34-4 auto/ac/apache1-1_3_34-5
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 19 Oct 2005 14:52:51 +0000 (14:52 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    apache1.init -> 1.16

apache1.init

index 187ce2222a18954f4816e37d51142f85fa86f8f6..060e0a9441c87431e99f4443b158e152b1fe9111 100644 (file)
@@ -64,9 +64,18 @@ case "$1" in
        /usr/sbin/apache -S
        ;;
   restart)
-       $0 stop
-       $0 start
-       exit $?
+       apache -t > /dev/null 2>&1
+       RETVAL=$?
+       if [ $RETVAL -eq 0 ]; then
+               $0 stop
+               RETVAL=$((RETVAL + $?))
+               $0 start
+               RETVAL=$((RETVAL + $?))
+       else
+               fail
+               echo "Configuration file syntax test failed."
+       fi
+
        ;;
   reload|force-reload)
        if [ -f /var/lock/subsys/apache ]; then
This page took 0.135703 seconds and 4 git commands to generate.