summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x2.4/init/apache2.initd9
1 files changed, 7 insertions, 2 deletions
diff --git a/2.4/init/apache2.initd b/2.4/init/apache2.initd
index e493f05..6320f1a 100755
--- a/2.4/init/apache2.initd
+++ b/2.4/init/apache2.initd
@@ -45,8 +45,6 @@ checkconfd() {
APACHE2_OPTS="${APACHE2_OPTS} -d ${SERVERROOT}"
APACHE2_OPTS="${APACHE2_OPTS} -f ${CONFIGFILE}"
- [ -n "${STARTUPERRORLOG}" ] && APACHE2_OPTS="${APACHE2_OPTS} -E ${STARTUPERRORLOG}"
-
}
checkconfig() {
@@ -66,6 +64,13 @@ checkconfig() {
start() {
checkconfig || return 1
+ if [ -n "${STARTUPERRORLOG}" ] ; then
+ # We must make sure that we only append to APACHE2_OPTS
+ # in start() and not in stop() or anywhere else that may
+ # be executed along with start(), see bug #566726.
+ APACHE2_OPTS="${APACHE2_OPTS} -E ${STARTUPERRORLOG}"
+ fi
+
ebegin "Starting ${SVCNAME}"
# Use start stop daemon to apply system limits #347301
start-stop-daemon --start -- ${APACHE2} ${APACHE2_OPTS} -k start