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.
pull/1648/head
Hank Leininger 2016-12-28 11:14:32 -05:00
parent 31a1560eaa
commit 9fbf713d7d
No known key found for this signature in database
GPG Key ID: 091E7F7CE898E86C
1 changed files with 1 additions and 1 deletions

View File

@ -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"
}