diff --git a/CHANGELOG b/CHANGELOG index c273e929..f3a6f7f0 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,9 +4,13 @@ |_| \__,_|_|_/___|_.__/\__,_|_||_| ============================================================= -Fail2Ban (version 0.7.9) 2007/04/19 +Fail2Ban (version 0.8.0) 2007/05/?? ============================================================= +ver. 0.8.0 (2007/05/??) - stable +---------- +- Fixed RedHat init script. Thanks to Jonathan Underwood + ver. 0.7.9 (2007/04/19) - release candidate ---------- - Close opened handlers. Thanks to Yaroslav Halchenko diff --git a/README b/README index 22262f4b..8eacfebe 100644 --- a/README +++ b/README @@ -74,7 +74,7 @@ Jonathan Kamens, Stephen Gildea, Markus Hoffmann, Mark Edgington, Patrick Börjesson, kojiro, zugeschmiert, Tyler, Nick Munger, Christoph Haas, Justin Shore, Joël Bertrand, René Berber, mEDI, Axel Thimm, Eric Gerbier, Christian Rauch, -Michael C. Haller +Michael C. Haller, Jonathan Underwood License: -------- diff --git a/files/redhat-initd b/files/redhat-initd index 12867615..205294cf 100755 --- a/files/redhat-initd +++ b/files/redhat-initd @@ -20,14 +20,14 @@ FAIL2BAN="/usr/bin/fail2ban-client" RETVAL=0 getpid() { - #pid=`ps -ef | grep fail2ban-|grep -v grep|grep -v bash|awk '{print $2}'` - pid=`ps -ef | grep fail2ban-|grep -v grep|awk '{print $2}'` + pid=`ps -ef | grep fail2ban-|grep -v grep|awk '{print $2}'` } start() { echo -n $"Starting fail2ban: " getpid if [ -z "$pid" ]; then + rm -rf /tmp/fail2ban.sock # in case of unclean shutdown $FAIL2BAN start > /dev/null RETVAL=$? fi @@ -47,7 +47,6 @@ stop() { RETVAL=$? if [ -n "$pid" ]; then $FAIL2BAN stop > /dev/null - fi sleep 1 getpid if [ -z "$pid" ]; then @@ -56,6 +55,9 @@ stop() { else echo_failure fi + else + echo_failure + fi echo return $RETVAL } @@ -72,13 +74,14 @@ case "$1" in getpid if [ -n "$pid" ]; then echo "Fail2ban (pid $pid) is running..." + $FAIL2BAN status else RETVAL=1 echo "Fail2ban is stopped" fi ;; restart) - stop + stop start ;; *)