/etc/init.d/httpd
#!/bin/sh
#
# /etc/rc.d/init.d/httpd
#
# Control the httpd
#
# chkconfig: 345 44 56
# description: apache httpd
#
ctrl=/usr/local/apache2/bin/apachectl
command=$1
# Source function library.
. /etc/init.d/functions
exec_httpd() {
echo -n $"httpd $command : "
daemon "$ctrl $command"
echo
}
case "$command" in
start|stop|graceful|graceful-stop)
exec_httpd
;;
restart)
$0 stop
$0 start
;;
*)
echo $"Usage: $0 {start|stop|restart|graceful|graceful-stop}"
exit 1
esac
exit 0
chmod +x /etc/init.d/httpd
chkconfig httpd on