1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-23 00:43:28 +00:00

- Add a sanity check on apache2 configuration files before reloading or

restarting apache2 (to avoid an expected failure on restart)
This commit is contained in:
Clement Laforet 2004-08-23 15:44:51 +00:00
parent 7569b19c49
commit 83d8251d79
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=117133
2 changed files with 16 additions and 0 deletions

View File

@ -29,6 +29,8 @@ name="apache2"
rcvar=`set_rcvar`
start_precmd="apache2_precmd"
restart_precmd="apache2_checkconfig"
reload_precmd="apache2_checkconfig"
command="%%PREFIX%%/sbin/httpd"
pidfile="/var/run/httpd.pid"
required_files=%%PREFIX%%/etc/apache2/httpd.conf
@ -44,6 +46,12 @@ load_rc_config $name
checkyesno apache2ssl_enable && \
apache2_flags="-DSSL $apache2_flags"
apache2_checkconfig()
{
echo "Performing sanity check on apache2 configuration:"
${command} -t
}
apache2_precmd()
{
if test -f %%PREFIX%%/sbin/envvars

View File

@ -29,6 +29,8 @@ name="apache2"
rcvar=`set_rcvar`
start_precmd="apache2_precmd"
restart_precmd="apache2_checkconfig"
reload_precmd="apache2_checkconfig"
command="%%PREFIX%%/sbin/httpd"
pidfile="/var/run/httpd.pid"
required_files=%%PREFIX%%/etc/apache2/httpd.conf
@ -44,6 +46,12 @@ load_rc_config $name
checkyesno apache2ssl_enable && \
apache2_flags="-DSSL $apache2_flags"
apache2_checkconfig()
{
echo "Performing sanity check on apache2 configuration:"
${command} -t
}
apache2_precmd()
{
if test -f %%PREFIX%%/sbin/envvars