diff options
author | Clement Laforet <clement@FreeBSD.org> | 2005-12-13 22:26:57 +0000 |
---|---|---|
committer | Clement Laforet <clement@FreeBSD.org> | 2005-12-13 22:26:57 +0000 |
commit | 1343a99fc94254ff492810218fe018152f47aa48 (patch) | |
tree | febef24dcb1ca576ca704a6073b7a5faabaec5ee /www/apache22/files/apache.sh | |
parent | a36d29bc3f41197cbdde7b200d6ab78d85094e59 (diff) |
- Fix envvars.d [1]
- Add apache22_http_accept_enable to load accf_http kernel module [2]
Additionnally, if it's not defined, we drop accept filter support
- Drop obsolete apache22ssl_enable rc.conf option
- Sync apache22.sh behavior with apachectl
Add graceful and graceful-stop targets
- Rework categories (add CACHE_MODULES)
- Add support for apr_dbd: MySQL, PostgrSQL and SQLite3 backends are supported
It adds mod_auth_dbd and mod_dbd automatically
more fixes to come soon...
PR: ports/90309 [1],
ports/90103 [2]
Submitted by: Simun Mikecin <sime@data.home.hr> [1],
Melvyn Sopacua <melvyn@melvyn.homeunix.net> [2]
Notes
Notes:
svn path=/head/; revision=151123
Diffstat (limited to 'www/apache22/files/apache.sh')
-rw-r--r-- | www/apache22/files/apache.sh | 40 |
1 files changed, 29 insertions, 11 deletions
diff --git a/www/apache22/files/apache.sh b/www/apache22/files/apache.sh index cfaeddd59624..d6b5b8dca05e 100644 --- a/www/apache22/files/apache.sh +++ b/www/apache22/files/apache.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# $FreeBSD: /tmp/pcvs/ports/www/apache22/files/Attic/apache.sh,v 1.9 2005-12-03 22:02:58 clement Exp $ +# $FreeBSD: /tmp/pcvs/ports/www/apache22/files/Attic/apache.sh,v 1.10 2005-12-13 22:26:57 clement Exp $ # # PROVIDE: apache22 @@ -12,9 +12,6 @@ # Add the following lines to /etc/rc.conf to enable apache22: # apache22_enable (bool): Set to "NO" by default. # Set it to "YES" to enable apache22 -# apache22ssl_enable (bool): Set to "NO" by default. -# Set it to "YES" to start apache with SSL -# (if <IfDefined SSL> exists in httpd.conf) # apache22limits_enable (bool):Set to "NO" by default. # Set it to yes to run `limits $limits_args` # just before apache starts. @@ -22,7 +19,9 @@ # Extra flags passed to start command. # apache22limits_args (str): Default to "-e -C daemon" # Arguments of pre-start limits run. -# +# apache22_http_accept_enable (bool): Set to "NO" by default. +# Set to yes to check for accf_http kernel +# module on start up and load if not loaded. . %%RC_SUBR%% name="apache22" @@ -31,20 +30,30 @@ rcvar=`set_rcvar` start_precmd="apache22_precmd" restart_precmd="apache22_checkconfig" reload_precmd="apache22_checkconfig" +reload_cmd="apache22_graceful" +graceful_cmd="apache22_graceful" +gracefulstop_cmd="apache22_gracefulstop" command="%%PREFIX%%/sbin/httpd" pidfile="/var/run/httpd.pid" required_files=%%PREFIX%%/etc/apache22/httpd.conf [ -z "$apache22_enable" ] && apache22_enable="NO" -[ -z "$apache22ssl_enable" ] && apache22ssl_enable="NO" [ -z "$apache22_flags" ] && apache22_flags="" [ -z "$apache22limits_enable" ] && apache22limits_enable="NO" [ -z "$apache22limits_args" ] && apache22limits_args="-e -C daemon" +[ -z "$apache22_http_accept_enable" ] && apache22_http_accept_enable="NO" load_rc_config $name -checkyesno apache22ssl_enable && \ - apache22_flags="-DSSL $apache22_flags" +if checkyesno apache22_http_accept_enable +then + if ! /sbin/kldstat -q -m accf_http + then + /sbin/kldload accf_http + fi +else + apache22_flags="-DNOHTTPACCEPT $apache22_flags" +fi apache22_checkconfig() { @@ -52,12 +61,23 @@ apache22_checkconfig() ${command} ${apache22_flags} -t } +apache22_graceful() { + echo "Performing a graceful restart" + ${command} -k graceful +} + +apache22_gracefulstop() { + echo "Performing a graceful stop" + ${command} -k graceful-stop +} + apache22_precmd() { if test -f %%PREFIX%%/sbin/envvars then . %%PREFIX%%/sbin/envvars fi + if checkyesno apache22limits_enable then eval `/usr/bin/limits ${apache22limits_args}` 2>/dev/null @@ -67,7 +87,5 @@ apache22_precmd() } -sig_reload=SIGUSR1 - -extra_commands="reload" +extra_commands="reload graceful gracefulstop" run_rc_command "$1" |