diff options
| author | Clement Laforet <clement@FreeBSD.org> | 2004-12-11 18:06:04 +0000 |
|---|---|---|
| committer | Clement Laforet <clement@FreeBSD.org> | 2004-12-11 18:06:04 +0000 |
| commit | a3468fefcb7e17260776ae49bc4053c7b66076fb (patch) | |
| tree | b345059920aea199678ac75606fc64d5512e13c2 /www/apache22/files/apache.sh | |
| parent | Connect fgfs-base. (diff) | |
- Add apache 2.1.2
This is a development version, awaiting for 2.2
Diffstat (limited to 'www/apache22/files/apache.sh')
| -rw-r--r-- | www/apache22/files/apache.sh | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/www/apache22/files/apache.sh b/www/apache22/files/apache.sh new file mode 100644 index 000000000000..ecc4de893edf --- /dev/null +++ b/www/apache22/files/apache.sh @@ -0,0 +1,73 @@ +#!/bin/sh +# +# $FreeBSD: /tmp/pcvs/ports/www/apache22/files/Attic/apache.sh,v 1.7 2004-12-11 18:06:04 clement Exp $ +# + +# PROVIDE: apache21 +# REQUIRE: NETWORKING SERVERS +# BEFORE: DAEMON +# KEYWORD: FreeBSD shutdown + +# +# Add the following lines to /etc/rc.conf to enable apache21: +# apache21_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable apache21 +# apache21ssl_enable (bool): Set to "NO" by default. +# Set it to "YES" to start apache with SSL +# (if <IfDefined SSL> exists in httpd.conf) +# apache21limits_enable (bool):Set to "NO" by default. +# Set it to yes to run `limits $limits_args` +# just before apache starts. +# apache21_flags (str): Set to "" by default. +# Extra flags passed to start command. +# apache21limits_args (str): Default to "-e -C daemon" +# Arguments of pre-start limits run. +# +. %%RC_SUBR%% + +name="apache21" +rcvar=`set_rcvar` + +start_precmd="apache21_precmd" +restart_precmd="apache21_checkconfig" +reload_precmd="apache21_checkconfig" +command="%%PREFIX%%/sbin/httpd" +pidfile="/var/run/httpd.pid" +required_files=%%PREFIX%%/etc/apache21/httpd.conf + +[ -z "$apache21_enable" ] && apache21_enable="NO" +[ -z "$apache21ssl_enable" ] && apache21ssl_enable="NO" +[ -z "$apache21_flags" ] && apache21_flags="" +[ -z "$apache21limits_enable" ] && apache21limits_enable="NO" +[ -z "$apache21limits_args" ] && apache21limits_args="-e -C daemon" + +load_rc_config $name + +checkyesno apache21ssl_enable && \ + apache21_flags="-DSSL $apache21_flags" + +apache21_checkconfig() +{ + echo "Performing sanity check on apache21 configuration:" + ${command} -t +} + +apache21_precmd() +{ + if test -f %%PREFIX%%/sbin/envvars + then + . %%PREFIX%%/sbin/envvars + fi + if checkyesno apache21limits_enable + then + eval `/usr/bin/limits ${apache21limits_args}` 2>/dev/null + else + return 0 + fi + +} + +sig_reload=SIGUSR1 + +extra_commands="reload" +run_rc_command "$1" |
