diff options
Diffstat (limited to 'build/rpm/httpd.init')
-rwxr-xr-x | build/rpm/httpd.init | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/build/rpm/httpd.init b/build/rpm/httpd.init index cf3f5a60..86aabd36 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 @@ -90,7 +93,7 @@ start() { } stop() { echo -n $"Stopping $prog: " - killproc -p ${pidfile} $httpd + killproc -p ${pidfile} -d 10 $httpd RETVAL=$? echo [ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile} @@ -116,7 +119,7 @@ case "$1" in echo $prog is stopped RETVAL=3 else - status -p {$pidfile} $httpd + status -p ${pidfile} $httpd RETVAL=$? fi ;; |