--- fail2ban-0.6.2/config/redhat-initd.init 2006-12-29 00:46:19.000000000 +0100
+++ fail2ban-0.6.2/config/redhat-initd 2006-12-29 00:46:54.000000000 +0100
@@ -2,7 +2,7 @@
#
# fail2ban
#
-# chkconfig: 345 91 9
+# chkconfig: - 91 9
# description: if many unsuccessfull login attempts from some ip address \
# during a short period happen, this address is banned \
# by the firewall
@@ -31,14 +31,17 @@
"${FAIL2BAN}" -b > /dev/null
RETVAL=$?
echo
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/fail2ban
+ return $RETVAL
}
stop() {
- if [ -f "${PIDFILE}" ]; then
- echo -n $"Stopping fail2ban: "
- "${FAIL2BAN}" -k > /dev/null
- echo
- fi
+ echo -n $"Stopping fail2ban: "
+ "${FAIL2BAN}" -k > /dev/null
+ RETVAL=$?
+ echo
+ [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/fail2ban
+ return $RETVAL
}
restart() {