#!/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
    killall httpd
    rm -f /var/run/httpd/*.pid
  ;;
  '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

