summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--2.4/scripts/apache2ctl9
1 files changed, 6 insertions, 3 deletions
diff --git a/2.4/scripts/apache2ctl b/2.4/scripts/apache2ctl
index 6f5920d..9012520 100644
--- a/2.4/scripts/apache2ctl
+++ b/2.4/scripts/apache2ctl
@@ -8,9 +8,12 @@ RC_VERBS="start stop restart checkconfd configtest modules virtualhosts configdu
load_rc_config() {
[ -f "${APACHE_RC_CONF}" ] || return 1
- eval "export $(grep '^[[:space:]]*APACHE2_OPTS' ${APACHE_RC_CONF})"
- eval $(grep '^[[:space:]]*SERVERROOT' ${APACHE_RC_CONF})
- eval $(grep '^[[:space:]]*CONFIGFILE' ${APACHE_RC_CONF})
+ if ! grep -q '^[[:space:]]*APACHE2_OPTS' ${APACHE_RC_CONF} ; then
+ echo "Cannot find APACHE2_OPTS in ${APACHE_RC_CONF}"
+ exit 1
+ fi
+ . ${APACHE_RC_CONF}
+ export APACHE2_OPTS
export SERVERROOT="${SERVERROOT:-/usr/@LIBDIR@/apache2}"
export CONFIGFILE="${CONFIGFILE:-/etc/apache2/httpd.conf}"
}