diff options
author | 2016-01-21 10:25:46 -0500 | |
---|---|---|
committer | 2016-03-03 13:46:26 +0100 | |
commit | 889c598ac4275caf37f2f9473f6947b4b4d7c0fe (patch) | |
tree | 35efe61ebba8eb2aff814c4f6f9d5e28709f7c2d | |
parent | apache2.initd: apply default values for conf.d variables in one place. (diff) | |
download | apache-889c598ac4275caf37f2f9473f6947b4b4d7c0fe.tar.gz apache-889c598ac4275caf37f2f9473f6947b4b4d7c0fe.tar.bz2 apache-889c598ac4275caf37f2f9473f6947b4b4d7c0fe.zip |
apache2.initd: set the path to the apache2 binary once, globally.
The $APACHE2 variable (containing the path to apache2) is currently
set every time checkconfd() is called. Its value never changes, and
the variable is already global, so we might as well set it once at the
beginning of the script.
-rwxr-xr-x | 2.4/init/apache2.initd | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/2.4/init/apache2.initd b/2.4/init/apache2.initd index 50b6500..c9d12c7 100755 --- a/2.4/init/apache2.initd +++ b/2.4/init/apache2.initd @@ -22,6 +22,9 @@ SERVERROOT="${SERVERROOT:-/usr/lib/apache2}" CONFIGFILE="${CONFIGFILE:-/etc/apache2/httpd.conf}" RELOAD_TYPE="${RELOAD_TYPE:-graceful}" +# The path to the apache2 binary. +APACHE2="/usr/sbin/apache2" + depend() { need net use mysql dns logger netmount postgresql @@ -44,7 +47,6 @@ checkconfd() { APACHE2_OPTS="${APACHE2_OPTS} -f ${CONFIGFILE}" [ -n "${STARTUPERRORLOG}" ] && APACHE2_OPTS="${APACHE2_OPTS} -E ${STARTUPERRORLOG}" - APACHE2="/usr/sbin/apache2" } checkconfig() { |