summaryrefslogtreecommitdiff
path: root/www/apache22/files/patch-support__apachectl.in
blob: 844f05c1bd10f53bae0c29327fcdde3cd47c984c (plain) (blame)
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
--- support/apachectl.in.orig	2006-07-12 03:38:44 UTC
+++ support/apachectl.in
@@ -35,6 +35,7 @@
 # When multiple arguments are given, only the error from the _last_
 # one is reported.  Run "apachectl help" for usage info
 #
+ACMD="$1"
 ARGV="$@"
 #
 # |||||||||||||||||||| START CONFIGURATION SECTION  ||||||||||||||||||||
@@ -42,6 +43,7 @@ ARGV="$@"
 # 
 # the path to your httpd binary, including options if necessary
 HTTPD='@exp_sbindir@/@progname@'
+SERVICE='/usr/sbin/service apache22'
 #
 # pick up any necessary environment variables
 if test -f @exp_sbindir@/envvars; then
@@ -65,19 +67,21 @@ ULIMIT_MAX_FILES="@APACHECTL_ULIMIT@"
 # --------------------                              --------------------
 # ||||||||||||||||||||   END CONFIGURATION SECTION  ||||||||||||||||||||
 
+eval `limits -e -C daemon` >/dev/null 2>&1
 # Set the maximum number of file descriptors allowed per child process.
 if [ "x$ULIMIT_MAX_FILES" != "x" ] ; then
     $ULIMIT_MAX_FILES
 fi
 
 ERROR=0
-if [ "x$ARGV" = "x" ] ; then 
-    ARGV="-h"
+if [ "x$ACMD" = "x" ] ; then 
+    ACMD="-h"
 fi
 
-case $ARGV in
-start|stop|restart|graceful|graceful-stop)
-    $HTTPD -k $ARGV
+case $ACMD in
+start|stop|restart|rcvar|reload|graceful|gracefulstop|graceful-stop)
+#    $HTTPD -k $ARGV
+    $SERVICE $( echo $ACMD | tr -d '-' )
     ERROR=$?
     ;;
 startssl|sslstart|start-SSL)
@@ -87,17 +91,19 @@ startssl|sslstart|start-SSL)
     ERROR=2
     ;;
 configtest)
-    $HTTPD -t
+#    $HTTPD -t
+    $SERVICE $ACMD
     ERROR=$?
     ;;
 status)
-    $LYNX $STATUSURL | awk ' /process$/ { print; exit } { print } '
+#    $LYNX $STATUSURL | awk ' /process$/ { print; exit } { print } '
+    $SERVICE $ACMD
     ;;
 fullstatus)
     $LYNX $STATUSURL
     ;;
 *)
-    $HTTPD $ARGV
+    $HTTPD "$@"
     ERROR=$?
 esac