Bug#349709: apache2-common: please add more flexibility to apache2ctl
tags #349709 patch
thanks
On Tue, Jan 24, 2006 at 08:55:30PM +0100, Marc Haber wrote:
> I would like to submit a patch
Attached.
Greetings
Marc
--
-----------------------------------------------------------------------------
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany | lose things." Winona Ryder | Fon: *49 621 72739834
Nordisch by Nature | How to make an American Quilt | Fax: *49 621 72739835
--- /usr/sbin/apache2ctl 2005-09-05 13:10:28.000000000 +0200
+++ ./apache2ctl 2006-01-24 21:20:32.000000000 +0100
@@ -41,27 +41,30 @@
# -------------------- --------------------
#
# the path to your httpd binary, including options if necessary
-HTTPD='/usr/sbin/apache2'
+test -z "$HTTPD" && HTTPD='/usr/sbin/apache2'
#
+# the path to the environment variable file
+test -z "$ENVVARS" && ENVVARS='/etc/apache2/envvars'
+
# pick up any necessary environment variables
-if test -f /etc/apache2/envvars; then
- . /etc/apache2/envvars
+if test -f "$ENVVARS"; then
+ . $ENVVARS
fi
#
# 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.
-LYNX="www-browser -dump"
+test -z "$LYNX" && LYNX="www-browser -dump"
#
# the URL to your server's mod_status status page. If you do not
# have one, then status and fullstatus will not work.
-STATUSURL="http://localhost:80/server-status"
+test -z "$STATUSURL" && STATUSURL="http://localhost:80/server-status"
#
# Set this variable to a command that increases the maximum
# number of file descriptors allowed per child process. This is
# critical for configurations that use many file descriptors,
# such as mass vhosting, or a multithreaded server.
-ULIMIT_MAX_FILES="ulimit -S -n `ulimit -H -n`"
+test -z "$ULIMIT_MAX_FILES" && ULIMIT_MAX_FILES="ulimit -S -n `ulimit -H -n`"
# -------------------- --------------------
# |||||||||||||||||||| END CONFIGURATION SECTION ||||||||||||||||||||
@@ -77,15 +80,15 @@
case $ARGV in
start|stop|restart|graceful)
- $HTTPD -k $ARGV
+ $HTTPD -k $ARGV $HTTPD_ARGS
ERROR=$?
;;
startssl|sslstart|start-SSL)
- $HTTPD -k start -DSSL
+ $HTTPD -k start -DSSL $HTTPD_ARGS
ERROR=$?
;;
configtest)
- $HTTPD -t
+ $HTTPD -t $HTTPD_ARGS
ERROR=$?
;;
status)
@@ -95,9 +98,8 @@
$LYNX $STATUSURL
;;
*)
- $HTTPD $ARGV
+ $HTTPD $ARGV $HTTPD_ARGS
ERROR=$?
esac
exit $ERROR
-
Reply to: