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