#! /bin/sh

#
# /etc/rc.d/init.d/S15inet - Start/Stop the inetd daemon(s).
#

# Comment out the following exit line to enable this script.
exit 0
KILLWAIT=3
DAEMON="inetd"

case "$1" in

    start)
	echo "Starting ${DAEMON}"
	${DAEMON}
	if [ "$?" = "0" ]; then echo "Done"
	else                    echo "FAILED"; fi
	;;

    stop)
	echo "Stopping ${DAEMON}"
	killall -15 ${DAEMON}
	sleep ${KILLWAIT}
	killall -9 ${DAEMON}
	if [ "$?" = "0" ]; then echo "Done"
	else                    echo "FAILED"; fi
	;;

    restart)
	$0 stop
	sleep 1
	$0 start
	;;

    *)
	echo "Usage: $0 (start|stop|restart)"
	exit 1
	;;

esac

exit 0

