summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x2.4/init/apache2.initd17
1 files changed, 16 insertions, 1 deletions
diff --git a/2.4/init/apache2.initd b/2.4/init/apache2.initd
index b0be24a..941dad9 100755
--- a/2.4/init/apache2.initd
+++ b/2.4/init/apache2.initd
@@ -33,9 +33,24 @@ APACHE2_OPTS="${APACHE2_OPTS} -f ${CONFIGFILE}"
APACHE2="/usr/sbin/apache2"
depend() {
- need net
use dns entropy logger mysql netmount postgresql
after sshd
+ if ! echo ${rc_need} | grep -Fq "net." ; then
+ local x warn_addr
+ for x in $(virtualhosts | grep '^\(\[\|\)[[:digit:]]' | sed 's@\(:[[:digit:]]\{1,5\}\)\([[:space:]].*\|$\)@\1@' | sort -u) ; do
+ case "${x}" in
+ \*:80|\*.443) ;;
+ *) warn_addr="${warn_addr} ${x}" ;;
+ esac
+ done
+ if [ -n "${warn_addr}" ] ; then
+ need net
+ ewarn "You are binding an interface in you virtual hosts."
+ ewarn "You must add rc_need=\"net.FOO\" to your ${RC_PREFIX%/}/etc/conf.d/apache2"
+ ewarn "where FOO is the interface(s) providing the following address(es):"
+ ewarn "${warn_addr}"
+ fi
+ fi
}
configtest() {