aboutsummaryrefslogtreecommitdiffstats
path: root/www
diff options
context:
space:
mode:
authorclement <clement@FreeBSD.org>2004-08-23 23:44:51 +0800
committerclement <clement@FreeBSD.org>2004-08-23 23:44:51 +0800
commitff21a4bb266623a35359e62e0824d72cd5497c46 (patch)
tree66d79b22a96dbe80fba2e019202f97f44f5ffbd6 /www
parent605e202a3a68fbdfe4c847ea409d170e758f5b24 (diff)
downloadfreebsd-ports-graphics-ff21a4bb266623a35359e62e0824d72cd5497c46.tar.gz
freebsd-ports-graphics-ff21a4bb266623a35359e62e0824d72cd5497c46.tar.zst
freebsd-ports-graphics-ff21a4bb266623a35359e62e0824d72cd5497c46.zip
- Add a sanity check on apache2 configuration files before reloading or
restarting apache2 (to avoid an expected failure on restart)
Diffstat (limited to 'www')
-rw-r--r--www/apache2/files/apache.sh8
-rw-r--r--www/apache20/files/apache.sh8
2 files changed, 16 insertions, 0 deletions
diff --git a/www/apache2/files/apache.sh b/www/apache2/files/apache.sh
index 1fbc67d2d0a..ff570a83a9c 100644
--- a/www/apache2/files/apache.sh
+++ b/www/apache2/files/apache.sh
@@ -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
diff --git a/www/apache20/files/apache.sh b/www/apache20/files/apache.sh
index 1fbc67d2d0a..ff570a83a9c 100644
--- a/www/apache20/files/apache.sh
+++ b/www/apache20/files/apache.sh
@@ -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