diff options
author | Clement Laforet <clement@FreeBSD.org> | 2004-06-05 11:14:18 +0000 |
---|---|---|
committer | Clement Laforet <clement@FreeBSD.org> | 2004-06-05 11:14:18 +0000 |
commit | 70fd25d3a09849a76843d98d47261d98eea76389 (patch) | |
tree | 108eeb46a122884e638399f18dd8c2104bc4b16a /www/apache2/files | |
parent | - Update to version 1.9011 (diff) |
-1- make show-options readable from a vt100 ;-)
-2- add WITH_DEBUG knob (supports DEBUG_FLAGS)
-3- convert start script to RCng [1]
- add possibility to run limits(1) before apache starts
- apache2.sh reload = apachectl graceful
-4- Add threadpool MPM
-5- Adapt COMMENT to fit MPM.
-6- Bump PORTREVISION
PR: ports/66955 [1]
Submitted by: nork [1] (partially)
Requested by: ume [1]
Notes
Notes:
svn path=/head/; revision=110873
Diffstat (limited to 'www/apache2/files')
-rw-r--r-- | www/apache2/files/apache.sh | 66 |
1 files changed, 50 insertions, 16 deletions
diff --git a/www/apache2/files/apache.sh b/www/apache2/files/apache.sh index ab1a71895d0c..0ed476f53974 100644 --- a/www/apache2/files/apache.sh +++ b/www/apache2/files/apache.sh @@ -1,17 +1,51 @@ #!/bin/sh -PREFIX=@@PREFIX@@ - -case "$1" in -start) - [ "@@SSL@@" = "ssl" -a -f "$PREFIX/etc/apache2/ssl.crt/server.crt" ] && SSL=ssl - [ -x ${PREFIX}/sbin/apachectl ] && ${PREFIX}/sbin/apachectl start${SSL} > /dev/null && echo -n ' apache2' - ;; -stop) - [ -r /var/run/httpd.pid ] && ${PREFIX}/sbin/apachectl stop > /dev/null && echo -n ' apache2' - ;; -*) - echo "Usage: `basename $0` {start|stop}" >&2 - ;; -esac - -exit 0 +# +# $FreeBSD$ +# + +# PROVIDE: apache2 +# REQUIRE: NETWORKING SERVERS +# BEFORE: DAEMON +# KEYWORD: FreeBSD shutdown + +# +# Add the following lines to /etc/rc.conf to enable apache2: +# apache2_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable apache2 +# apache2ssl_enable (bool): Set to "NO" by default. +# Set it to "YES" to start apache with SSL +# (if <IfDefined SSL> exists in httpd.conf) +# apache2limits_enable (bool):Set to "NO" by default. +# Set it to yes to run `limits $limits_args` +# just before apache starts. +# apache2_flags (str): Set to "" by default. +# Extra flags passed to start command +# apache2limits_args (str): Default to "-e -U %%WWWOWN%%" +# Arguments of pre-start limits run. +# +. %%RC_SUBR%% + +name="apache2" +rcvar=`set_rcvar` + +command="%%PREFIX%%/sbin/httpd" +pidfile="/var/run/httpd.pid" +required_files=%%PREFIX%%/etc/apache2/httpd.conf + +[ -z "$apache2_enable" ] && apache2_enable="NO" +[ -z "$apache2ssl_enable" ] && apache2ssl_enable="NO" +[ -z "$apache2_flags" ] && apache2_flags="" +[ -z "$apache2limits_enable" ] && apache2limits_enable="NO" +[ -z "$apache2limits_args" ] && apache2limits_args="-e -U %%WWWOWN%%" + +load_rc_config $name + +checkyesno apache2ssl_enable && \ + apache2_flags="-DSSL $apache2_flags" + +checkyesno apache2limits_enable && \ + start_precmd="`/usr/bin/limits ${apache2limits_args}`" + +sig_reload=SIGUSR1 + +run_rc_command "$1" |