#!/bin/bash
#
# chkconfig: 345 9 99
# description: nield

CMD="/usr/sbin/nield"
#OPTIONS="-d /var/log/nield.dbg"

[ -f /etc/rc.d/init.d/functions ] || exit 1 
. /etc/rc.d/init.d/functions

[ -x ${CMD} ] || exit 1

start() {
	echo -n $"Starting Network Interface Events Logging Daemon: "
	daemon ${CMD} ${OPTIONS}
	RETVAL=$?
	echo
	return $RETVAL
}

stop() {
	echo -n $"Stopping Network Interface Events Logging Daemon: "
	killproc ${CMD}
	RETVAL=$?
	echo
	return $RETVAL
}

case "$1" in
	start)
		start
		;;
	stop)
		stop
		;;
	restart)
		stop
		start
		;;
	*)
		echo "Usage: $0 {start|stop|restart}"
		exit 1
esac
