- Fixed RedHat init script. Thanks to Jonathan Underwood

git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@574 a942ae1a-1317-0410-a47c-b1dcaea8d605
0.x
Cyril Jaquier 2007-05-01 22:42:10 +00:00
parent 76c5bd80e5
commit 1e767cd8e3
3 changed files with 13 additions and 6 deletions

View File

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

2
README
View File

@ -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:
--------

View File

@ -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
;;
*)