From c6f81dafa14ea71fee6ed5c50517c5cdfbdb06f8 Mon Sep 17 00:00:00 2001 From: Ossi Salmi Date: Mon, 22 Jul 2013 14:53:09 +0300 Subject: [PATCH] abusehelper: Changed init start/stop order, sleep between botnet (re)starts --- abusehelper/files/botnet.init | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/abusehelper/files/botnet.init b/abusehelper/files/botnet.init index c22a0c5..6c3949e 100644 --- a/abusehelper/files/botnet.init +++ b/abusehelper/files/botnet.init @@ -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 }