#!/bin/sh
#
# httpd         This shell script takes care of starting and stopping
#               httpd.
#

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

[ -f /usr/sbin/httpd ] || exit 0

# See how we were called.
case "$1" in
  start)
        # Start daemons.
        echo -n "Starting httpd: "
        daemon httpd
        touch /var/lock/subsys/httpd
        echo
        ;;
  stop)
        # Stop daemons.
        echo -n "Shutting down httpd: "
	killproc httpd
        echo "done"
        rm -f /var/lock/subsys/httpd
        ;;
  *)
        echo "Usage: httpd {start|stop}"
        exit 1
esac

exit 0
