#!/bin/bash
#
# htpd	This shell script takes care of starting and stopping htpd.
#
# chkconfig: 2345 65 35
# description: The HTTP Time Protocol daemon manages the \
# time using "HTP" (the HTTP Time Protocol) to set the system \
# clock periodically from remote web servers.
# probe: false
# processname: htpd
# pidfile: /var/run/htpd/htpd.pid
# config: /etc/htpd.conf

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

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

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

[ -x /usr/sbin/htpd ] || exit 0

# See how we were called.
case "$1" in
start)
	echo -n "Starting htpd: "
	daemon htpd
	echo
	touch /var/lock/subsys/htpd
	;;
stop)
	echo -n "Stopping htpd: "
	killproc htpd
	echo
	rm -f /var/lock/subsys/htpd
	;;
status)
	status htpd
	;;
restart|reload)
	$0 stop
	$0 start
	;;
condrestart)
	[ -f /var/lock/subsys/htpd ] && restart
	;;
  *)
	echo "Usage: htpd {start|stop|status|restart|condrestart|reload}"
	exit 1
esac

exit 0
