From 9fbf713d7dc662ca6707682a676f4964b15e61ac Mon Sep 17 00:00:00 2001 From: Hank Leininger Date: Wed, 28 Dec 2016 11:14:32 -0500 Subject: [PATCH] Wait up to 30 seconds on "stop" to avoid errors. The fail2ban server can take several seconds to shut down. This can make Gentoo's start-stop-service time out and decide that stopping has failed, even if it actually succeeds a few seconds later. The default timeout for start-stop-service if --retry is not specified appears to be 5 seconds. Increase that to 30 seconds to be sure that if fail2ban-server is going to be able to stop, it has time to do so. --- files/gentoo-initd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/gentoo-initd b/files/gentoo-initd index c5b5b702..c4d8675c 100755 --- a/files/gentoo-initd +++ b/files/gentoo-initd @@ -41,7 +41,7 @@ start() { stop() { ebegin "Stopping fail2ban" - start-stop-daemon --stop --pidfile /var/run/fail2ban/fail2ban.pid \ + start-stop-daemon --stop --pidfile /var/run/fail2ban/fail2ban.pid --retry 30 \ -- ${FAIL2BAN} stop eend $? "Failed to stop fail2ban" }