2009-08-26 17:00:38 +02:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# /etc/rc.d/rc.httpd
|
|
|
|
#
|
2023-08-16 22:45:00 +02:00
|
|
|
# Start/stop/force-restart/restart/graceful[ly restart]/graceful[ly]-stop
|
2009-08-26 17:00:38 +02:00
|
|
|
# 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')
|
2023-08-16 22:45:00 +02:00
|
|
|
if [ ! -r /run/httpd.pid ]; then
|
|
|
|
pkill -f /usr/sbin/httpd
|
|
|
|
else
|
|
|
|
/usr/sbin/apachectl -k stop
|
|
|
|
fi
|
|
|
|
pwait -f /usr/sbin/httpd
|
2012-09-26 03:10:42 +02:00
|
|
|
;;
|
|
|
|
'force-restart')
|
2023-08-16 22:45:00 +02:00
|
|
|
if [ ! -r /run/httpd.pid ]; then
|
|
|
|
pkill -f /usr/sbin/httpd
|
|
|
|
else
|
|
|
|
/usr/sbin/apachectl -k stop
|
|
|
|
fi
|
|
|
|
pwait -f /usr/sbin/httpd
|
2012-09-26 03:10:42 +02:00
|
|
|
/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
|
|
|
|
;;
|
|
|
|
*)
|
2023-08-16 22:45:00 +02:00
|
|
|
echo "Usage: $0 {start|stop|force-restart|restart|graceful|graceful-stop}"
|
2009-08-26 17:00:38 +02:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|