12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- Index: httpd-2.2.17/support/apachectl.in
- ===================================================================
- --- httpd-2.2.17.orig/support/apachectl.in
- +++ httpd-2.2.17/support/apachectl.in
- @@ -43,19 +43,22 @@ ARGV="$@"
- # the path to your httpd binary, including options if necessary
- HTTPD='@exp_sbindir@/@progname@'
- #
- -# pick up any necessary environment variables
- -if test -f @exp_sbindir@/envvars; then
- - . @exp_sbindir@/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="@LYNX_PATH@ -dump"
- +if [ -x "@LYNX_PATH@" ]; then
- + LYNX="@LYNX_PATH@ -dump"
- +else
- + LYNX=none
- +fi
- #
- # 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:@PORT@/server-status"
- +# Source /etc/conf.d/apache2 for $HTTPD setting, etc.
- +if [ -r /etc/conf.d/apache2 ]; then
- + . /etc/conf.d/apache2
- +fi
- #
- # Set this variable to a command that increases the maximum
- # number of file descriptors allowed per child process. This is
- @@ -75,29 +78,39 @@ if [ "x$ARGV" = "x" ] ; then
- ARGV="-h"
- fi
-
- +function checklynx() {
- +if [ "$LYNX" = "none" ]; then
- + echo "The 'links' package is required for this functionality."
- + exit 8
- +fi
- +}
- +
- case $ARGV in
- -start|stop|restart|graceful|graceful-stop)
- - $HTTPD -k $ARGV
- - ERROR=$?
- +restart|graceful)
- + if $HTTPD $OPTIONS -t >&/dev/null; then
- + $HTTPD $OPTIONS -k $ARGV
- + ERROR=$?
- + else
- + echo "apachectl: Configuration syntax error, will not run \"$ARGV\":"
- + testconfig
- + fi
- ;;
- -startssl|sslstart|start-SSL)
- - echo The startssl option is no longer supported.
- - echo Please edit httpd.conf to include the SSL configuration settings
- - echo and then use "apachectl start".
- - ERROR=2
- +start|stop|graceful-stop)
- + $HTTPD $OPTIONS -k $ARGV
- + ERROR=$?
- ;;
- configtest)
- - $HTTPD -t
- - ERROR=$?
- + testconfig
- ;;
- status)
- + checklynx
- $LYNX $STATUSURL | awk ' /process$/ { print; exit } { print } '
- ;;
- fullstatus)
- $LYNX $STATUSURL
- ;;
- *)
- - $HTTPD $ARGV
- + $HTTPD $OPTIONS $ARGV
- ERROR=$?
- esac
-
|