#!/bin/bash
#
# dns_flood_detector	This shell script takes care of starting and stopping dns_flood_detector.
#
# chkconfig: 2345 65 35
# description: dns_flood_detector -  DNS flood detector daemon
# probe: false
# processname: dns_flood_detector
# pidfile: /var/run/dns_flood_detector.pid

# 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/dns_flood_detector ] || exit 0


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

exit 0
