abusehelper: Changed init start/stop order, sleep between botnet (re)starts

This commit is contained in:
Ossi Salmi 2013-07-22 14:53:09 +03:00
parent 9054f4a5f8
commit c6f81dafa1

View file

@ -1,6 +1,6 @@
#!/bin/sh
# chkconfig: 2345 90 10
# chkconfig: 2345 99 01
# description: AbuseHelper botnets
# processname: botnet
@ -56,8 +56,11 @@ botnet_action() {
}
start_botnets() {
for botnet in ${BOTNETS}; do
botnet_action start ${botnet}
set -- ${BOTNETS}
while [ $# -gt 0 ]; do
botnet_action start ${1}
shift
test -n "${1}" && sleep 10
done
}
@ -68,8 +71,11 @@ stop_botnets() {
}
restart_botnets() {
for botnet in ${BOTNETS}; do
botnet_action restart ${botnet}
set -- ${BOTNETS}
while [ $# -gt 0 ]; do
botnet_action restart ${1}
shift
test -n "${1}" && sleep 10
done
}