- Xmas for apache13-ssl!
Give it a rcNG startup script Also requested by: sem
This commit is contained in:
parent
078cf4e190
commit
c868f0d3f4
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=123923
3 changed files with 69 additions and 2 deletions
|
@ -19,7 +19,7 @@ EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
|
|||
|
||||
#PATCH_SITES= ${MASTER_SITE_APACHE_HTTPD}
|
||||
#PATCH_SITE_SUBDIR= patches/apply_to_${APACHE_VERSION}
|
||||
#PATCHFILES=
|
||||
#PATCHFILES=
|
||||
|
||||
MAINTAINER= clement@FreeBSD.org
|
||||
COMMENT= Apache-SSL: Apache secure webserver integrating OpenSSL
|
||||
|
@ -36,6 +36,8 @@ APACHE_SSL_VERSION= 1.55
|
|||
USE_OPENSSL= yes
|
||||
USE_PERL5= yes
|
||||
HAS_CONFIGURE= yes
|
||||
USE_RC_SUBR= yes
|
||||
RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR} WWWOWN=${WWWOWN}
|
||||
|
||||
MASTER_SITES_APACHE_SSL= \
|
||||
ftp://ftp.ox.ac.uk/pub/crypto/SSL/Apache-SSL/ \
|
||||
|
@ -129,7 +131,8 @@ post-extract:
|
|||
post-patch:
|
||||
@cd ${WRKSRC} && ${SETENV} PREFIX=${PREFIX} ./FixPatch ${OPENSSLBASE}
|
||||
@${PATCH} ${PATCH_ARGS} < ${FILESDIR}/post-patch-conf:httpd.conf-dist
|
||||
|
||||
@${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
|
||||
${FILESDIR}/apache.sh > ${WRKDIR}/apache.sh
|
||||
post-install:
|
||||
@${ECHO_CMD} ""
|
||||
@${ECHO_CMD} "SSL is disabled by default"
|
||||
|
@ -137,6 +140,7 @@ post-install:
|
|||
@${ECHO_CMD} " http://www.apache-ssl.org/docs.html"
|
||||
@${ECHO_CMD} " to know how to configure correctly apache-ssl"
|
||||
@${ECHO_CMD} ""
|
||||
@${INSTALL_SCRIPT} ${WRKDIR}/apache.sh ${PREFIX}/etc/rc.d
|
||||
|
||||
certificate:
|
||||
-${MKDIR} ${PREFIX}/etc/apache/certs
|
||||
|
|
62
www/apache13-ssl/files/apache.sh
Normal file
62
www/apache13-ssl/files/apache.sh
Normal file
|
@ -0,0 +1,62 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
# PROVIDE: apache
|
||||
# REQUIRE: NETWORKING SERVERS
|
||||
# BEFORE: DAEMON
|
||||
# KEYWORD: FreeBSD shutdown
|
||||
|
||||
#
|
||||
# Add the following lines to /etc/rc.conf to enable apache:
|
||||
# apache_enable (bool): Set to "NO" by default.
|
||||
# Set it to "YES" to enable apache
|
||||
# apachelimits_enable (bool):Set to "NO" by default.
|
||||
# Set it to yes to run `limits $limits_args`
|
||||
# just before apache starts.
|
||||
# apache_flags (str): Set to "" by default.
|
||||
# Extra flags passed to start command.
|
||||
# apachelimits_args (str): Default to "-e -C daemon"
|
||||
# Arguments of pre-start limits run.
|
||||
#
|
||||
. %%RC_SUBR%%
|
||||
|
||||
name="apache"
|
||||
rcvar=`set_rcvar`
|
||||
|
||||
start_precmd="apache_precmd"
|
||||
restart_precmd="apache_checkconfig"
|
||||
reload_precmd="apache_checkconfig"
|
||||
command="%%PREFIX%%/sbin/httpsd"
|
||||
pidfile="/var/run/httpsd.pid"
|
||||
required_files=%%PREFIX%%/etc/apache/httpsd.conf
|
||||
|
||||
[ -z "$apache_enable" ] && apache_enable="NO"
|
||||
[ -z "$apache_flags" ] && apache_flags=""
|
||||
[ -z "$apachelimits_enable" ] && apachelimits_enable="NO"
|
||||
[ -z "$apachelimits_args" ] && apachelimits_args="-e -C daemon"
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
apache_checkconfig()
|
||||
{
|
||||
echo "Performing sanity check on apache configuration:"
|
||||
${command} -t
|
||||
}
|
||||
|
||||
apache_precmd()
|
||||
{
|
||||
if checkyesno apachelimits_enable
|
||||
then
|
||||
eval `/usr/bin/limits ${apachelimits_args}` 2>/dev/null
|
||||
else
|
||||
return 0
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
sig_reload=SIGUSR1
|
||||
|
||||
extra_commands="reload"
|
||||
run_rc_command "$1"
|
|
@ -3,6 +3,7 @@ bin/checkgid
|
|||
bin/dbmmanage
|
||||
bin/htdigest
|
||||
bin/htpasswd
|
||||
etc/rc.d/apache.sh
|
||||
@unexec if cmp -s %D/etc/apache/access.conf %D/etc/apache/access.conf-dist; then rm -f %D/etc/apache/access.conf; fi
|
||||
etc/apache/access.conf-dist
|
||||
@exec [ -f %B/access.conf ] || cp %B/%f %B/access.conf
|
||||
|
|
Loading…
Reference in a new issue