pkgsrc/www/apache/patches/patch-ah
abs e4191b33fd Update apache to apache_1-3.33nb3:
Previously rc.d/apache was updated to run stop & start for restart.
    '/etc/rc.d/apache restart' then picked up startssl if apache was not
    running, but if apache was running it has a large chance of the
    start running before the stop completes, leaving no httpd running.
    Instead, add a restartssl option to apachectl, and use it.
2005-02-28 23:30:48 +00:00

45 lines
1.3 KiB
Text

$NetBSD: patch-ah,v 1.5 2005/02/28 23:30:49 abs Exp $
--- src/support/apachectl.orig 2005-02-28 22:42:11.000000000 +0000
+++ src/support/apachectl
@@ -42,6 +42,9 @@ PIDFILE=/usr/local/apache/logs/httpd.pid
# the path to your httpd binary, including options if necessary
HTTPD='/usr/local/apache/src/httpd'
#
+# shared object search path
+LD_LIBRARY_PATH=
+export LD_LIBRARY_PATH
# a command that outputs a formatted text version of the HTML at the
# url given on the command line. Designed for lynx, however other
# programs may work.
@@ -138,6 +141,30 @@ do
fi
fi
;;
+ restartssl|sslrestart|restart-SSL)
+ if [ $RUNNING -eq 0 ]; then
+ echo "$0 $ARG: httpd not running, trying to start"
+ if $HTTPD -DSSL ; then
+ echo "$0 $ARG: httpd started"
+ else
+ echo "$0 $ARG: httpd could not be started"
+ ERROR=5
+ fi
+ else
+ if $HTTPD -t >/dev/null 2>&1; then
+ if kill -HUP $PID ; then
+ echo "$0 $ARG: httpd restarted"
+ else
+ echo "$0 $ARG: httpd could not be restarted"
+ ERROR=6
+ fi
+ else
+ echo "$0 $ARG: configuration broken, ignoring restart"
+ echo "$0 $ARG: (run 'apachectl configtest' for details)"
+ ERROR=6
+ fi
+ fi
+ ;;
graceful)
if [ $RUNNING -eq 0 ]; then
echo "$0 $ARG: httpd not running, trying to start"