#!/bin/bash

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

# Comment out the following exit line to enable this script.
# exit 0

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

DAEMON="/usr/sbin/inetd"

case "$1" in

    start)
	msg -n "Starting inetd:"
	daemon $DAEMON
	if [ "$?" = "0" ]; then
	    touch /var/lock/subsys/inet
	fi
	msg
	;;

    stop)
	msg -n "Stopping inetd:"
	killproc $DAEMON
	msg
	rm -f /var/lock/subsys/inet
	;;

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

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

esac

exit 0

