mirror of https://github.com/fail2ban/fail2ban
- Fixed RedHat init script. Thanks to Jonathan Underwood
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@574 a942ae1a-1317-0410-a47c-b1dcaea8d6050.x
parent
76c5bd80e5
commit
1e767cd8e3
|
@ -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
|
ver. 0.7.9 (2007/04/19) - release candidate
|
||||||
----------
|
----------
|
||||||
- Close opened handlers. Thanks to Yaroslav Halchenko
|
- Close opened handlers. Thanks to Yaroslav Halchenko
|
||||||
|
|
2
README
2
README
|
@ -74,7 +74,7 @@ Jonathan Kamens, Stephen Gildea, Markus Hoffmann, Mark
|
||||||
Edgington, Patrick Börjesson, kojiro, zugeschmiert, Tyler,
|
Edgington, Patrick Börjesson, kojiro, zugeschmiert, Tyler,
|
||||||
Nick Munger, Christoph Haas, Justin Shore, Joël Bertrand,
|
Nick Munger, Christoph Haas, Justin Shore, Joël Bertrand,
|
||||||
René Berber, mEDI, Axel Thimm, Eric Gerbier, Christian Rauch,
|
René Berber, mEDI, Axel Thimm, Eric Gerbier, Christian Rauch,
|
||||||
Michael C. Haller
|
Michael C. Haller, Jonathan Underwood
|
||||||
|
|
||||||
License:
|
License:
|
||||||
--------
|
--------
|
||||||
|
|
|
@ -20,14 +20,14 @@ FAIL2BAN="/usr/bin/fail2ban-client"
|
||||||
RETVAL=0
|
RETVAL=0
|
||||||
|
|
||||||
getpid() {
|
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() {
|
start() {
|
||||||
echo -n $"Starting fail2ban: "
|
echo -n $"Starting fail2ban: "
|
||||||
getpid
|
getpid
|
||||||
if [ -z "$pid" ]; then
|
if [ -z "$pid" ]; then
|
||||||
|
rm -rf /tmp/fail2ban.sock # in case of unclean shutdown
|
||||||
$FAIL2BAN start > /dev/null
|
$FAIL2BAN start > /dev/null
|
||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
fi
|
fi
|
||||||
|
@ -47,7 +47,6 @@ stop() {
|
||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
if [ -n "$pid" ]; then
|
if [ -n "$pid" ]; then
|
||||||
$FAIL2BAN stop > /dev/null
|
$FAIL2BAN stop > /dev/null
|
||||||
fi
|
|
||||||
sleep 1
|
sleep 1
|
||||||
getpid
|
getpid
|
||||||
if [ -z "$pid" ]; then
|
if [ -z "$pid" ]; then
|
||||||
|
@ -56,6 +55,9 @@ stop() {
|
||||||
else
|
else
|
||||||
echo_failure
|
echo_failure
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
echo_failure
|
||||||
|
fi
|
||||||
echo
|
echo
|
||||||
return $RETVAL
|
return $RETVAL
|
||||||
}
|
}
|
||||||
|
@ -72,13 +74,14 @@ case "$1" in
|
||||||
getpid
|
getpid
|
||||||
if [ -n "$pid" ]; then
|
if [ -n "$pid" ]; then
|
||||||
echo "Fail2ban (pid $pid) is running..."
|
echo "Fail2ban (pid $pid) is running..."
|
||||||
|
$FAIL2BAN status
|
||||||
else
|
else
|
||||||
RETVAL=1
|
RETVAL=1
|
||||||
echo "Fail2ban is stopped"
|
echo "Fail2ban is stopped"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
restart)
|
restart)
|
||||||
stop
|
stop
|
||||||
start
|
start
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
Loading…
Reference in New Issue