summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorGraham Leggett <minfrin@apache.org>2011-02-08 22:51:31 +0000
committerGraham Leggett <minfrin@apache.org>2011-02-08 22:51:31 +0000
commit5f59927f485bc4970bcabc90628fdb5da9723d99 (patch)
tree53e91a3597f4e64eae416c4b5972c437a275701f /build
parent84a5c9cd6f080883cb11636d0bdf3b705a902fa3 (diff)
downloadhttpd-5f59927f485bc4970bcabc90628fdb5da9723d99.tar.gz
RPM spec file: Make the httpd init script consistent with the htcacheclean
init script. Multiple daemons can be started by creating symlinks to the init script. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1068660 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'build')
-rwxr-xr-xbuild/rpm/httpd.init13
1 files changed, 8 insertions, 5 deletions
diff --git a/build/rpm/httpd.init b/build/rpm/httpd.init
index 0d84d595f1..909aeeb5e2 100755
--- a/build/rpm/httpd.init
+++ b/build/rpm/httpd.init
@@ -38,8 +38,12 @@
# Source function library.
. /etc/rc.d/init.d/functions
-if [ -f /etc/sysconfig/httpd ]; then
- . /etc/sysconfig/httpd
+# What were we called? Multiple instances of the same daemon can be
+# created by creating suitably named symlinks to this startup script
+prog=$(basename $0 | sed -e 's/^[SK][0-9][0-9]//')
+
+if [ -f /etc/sysconfig/${prog} ]; then
+ . /etc/sysconfig/${prog}
fi
# Start httpd in the C locale by default.
@@ -54,9 +58,8 @@ INITLOG_ARGS=""
# work correctly with a thread-based MPM; notably PHP will refuse to start.
httpd=${HTTPD-/usr/sbin/httpd}
-prog=httpd
-pidfile=${PIDFILE-/var/log/httpd/httpd.pid}
-lockfile=${LOCKFILE-/var/lock/subsys/httpd}
+pidfile=${PIDFILE-/var/log/httpd/${prog}.pid}
+lockfile=${LOCKFILE-/var/lock/subsys/${prog}}
RETVAL=0
# check for 1.3 configuration