From 32b271c36e12cbf687189de880e2aab6303fb077 Mon Sep 17 00:00:00 2001 From: JP Espinosa Date: Mon, 3 Jun 2013 12:34:47 -0400 Subject: [PATCH] Update redhat-initd - Using `-x` to remove previous socket on start - Using Should- to wait for iptables and wrappers --- files/redhat-initd | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/files/redhat-initd b/files/redhat-initd index 8c1d03a4..43147c95 100755 --- a/files/redhat-initd +++ b/files/redhat-initd @@ -8,11 +8,14 @@ # ### BEGIN INIT INFO # Provides: fail2ban -# Required-Start: $local_fs $remote_fs $network -# Required-Stop: $local_fs $remote_fs $network +# Required-Start: $local_fs $remote_fs +# Required-Stop: $local_fs $remote_fs +# Should-Start: $time $network $syslog iptables firehol shorewall ferm +# Should-Stop: $network $syslog iptables firehol shorewall ferm # Default-Start: 3 4 5 # Default-Stop: 0 1 6 -# Short-Description: start and stop fail2ban +# Short-Description: Start/Stop fail2ban +# Description: Start/Stop fail2ban, a daemon to ban hosts that cause multiple authentication errors ### END INIT INFO # Source function library. @@ -30,8 +33,7 @@ RETVAL=0 start() { echo -n $"Starting fail2ban: " - rm -f ${socket} # in case of unclean shutdown - ${FAIL2BAN} start > /dev/null + ${FAIL2BAN} -x start > /dev/null RETVAL=$? if [ $RETVAL = 0 ]; then touch ${lockfile}