summaryrefslogtreecommitdiff
path: root/www/apache/patches/patch-ah
blob: 55da695b516d6b77cecd76d6b57a66675e527509 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
$NetBSD: patch-ah,v 1.6 2008/02/23 05:16:34 obache Exp $

--- src/support/apachectl.orig	2008-02-23 04:22:56.000000000 +0000
+++ src/support/apachectl
@@ -43,6 +43,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.  
@@ -139,6 +142,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"