2009-08-26 17:00:38 +02:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# /etc/rc.d/rc.httpd
|
|
|
|
#
|
|
|
|
# Start/stop/restart/graceful[ly restart]/graceful[ly]-stop
|
|
|
|
# the Apache (httpd) web server.
|
|
|
|
#
|
|
|
|
# To make Apache start automatically at boot, make this
|
|
|
|
# file executable: chmod 755 /etc/rc.d/rc.httpd
|
|
|
|
#
|
|
|
|
# For information on these options, "man apachectl".
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
'start')
|
|
|
|
/usr/sbin/apachectl -k start
|
|
|
|
;;
|
|
|
|
'stop')
|
|
|
|
/usr/sbin/apachectl -k stop
|
2018-05-28 21:12:29 +02:00
|
|
|
pkill -f /usr/sbin/httpd
|
2012-09-26 03:10:42 +02:00
|
|
|
# Remove both old and new .pid locations:
|
|
|
|
rm -f /var/run/httpd.pid /var/run/httpd/httpd.pid
|
|
|
|
;;
|
|
|
|
'force-restart')
|
|
|
|
# Because sometimes restarting through apachectl just doesn't do the trick...
|
|
|
|
/usr/sbin/apachectl -k stop
|
2018-05-28 21:12:29 +02:00
|
|
|
pkill -f /usr/sbin/httpd
|
2012-09-26 03:10:42 +02:00
|
|
|
# Remove both old and new .pid locations:
|
|
|
|
rm -f /var/run/httpd.pid /var/run/httpd/httpd.pid
|
|
|
|
/usr/sbin/apachectl -k start
|
2009-08-26 17:00:38 +02:00
|
|
|
;;
|
|
|
|
'restart')
|
|
|
|
/usr/sbin/apachectl -k restart
|
|
|
|
;;
|
|
|
|
'graceful')
|
|
|
|
/usr/sbin/apachectl -k graceful
|
|
|
|
;;
|
|
|
|
'graceful-stop')
|
|
|
|
/usr/sbin/apachectl -k graceful-stop
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Usage: $0 {start|stop|restart|graceful|graceful-stop}"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|