mirror of
https://github.com/Ponce/slackbuilds
synced 2024-12-01 01:00:03 +01:00
37 lines
478 B
Bash
37 lines
478 B
Bash
#!/bin/sh
|
|
|
|
dnsflood_start() {
|
|
if [ -x /usr/sbin/dns_flood_detector ]; then
|
|
echo "Starting DNS Flood Detector: /usr/sbin/dns_flood_detector -d"
|
|
/usr/sbin/dns_flood_detector -d
|
|
fi
|
|
|
|
}
|
|
|
|
dnsflood_stop() {
|
|
killall dns_flood_detector
|
|
|
|
}
|
|
|
|
dnsflood_restart() {
|
|
dnsflood_stop
|
|
sleep 1
|
|
dnsflood_start
|
|
|
|
}
|
|
|
|
case "$1" in
|
|
'start')
|
|
dnsflood_start
|
|
;;
|
|
'stop')
|
|
dnsflood_stop
|
|
;;
|
|
'restart')
|
|
dnsflood_restart
|
|
;;
|
|
*)
|
|
echo "Usage: $0 start|stop|restart"
|
|
exit 1
|
|
esac
|
|
|