X-Git-Url: https://git.pld-linux.org/?a=blobdiff_plain;f=apache1.init;h=929ffa338d2005d9e880364dd4621359e2b54d5a;hb=1babec3822846fced6b71ae4c056dbca1b9c92d0;hp=fcc381efadd4f0c489449175496988a185c8e51f;hpb=cdee1d6ec1704772d93642bec6b9d6d94f72801f;p=packages%2Fapache.git diff --git a/apache1.init b/apache1.init index fcc381e..929ffa3 100644 --- a/apache1.init +++ b/apache1.init @@ -21,7 +21,7 @@ # Check that networking is up. if is_yes "${NETWORKING}"; then - if [ ! -f /var/lock/subsys/network -a != stop -a != status ]; then + if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then # nls "ERROR: Networking is down. %s can't be run." msg_network_down httpd exit 1 @@ -63,13 +63,23 @@ case "$1" in RETVAL=$? /usr/sbin/httpd -S ;; - restart|force-reload) + restart) $0 stop $0 start exit $? ;; + reload|force-reload) + if [ -f /var/lock/subsys/httpd ]; then + msg_reloading httpd + killproc httpd -HUP + RETVAL=$? + else + msg_not_running httpd >&2 + RETVAL=7 + fi + ;; *) - msg_usage "$0 {start|stop|restart|force-reload|status}" + msg_usage "$0 {start|stop|restart|reload|force-reload|status}" exit 3 ;; esac