fixed init.d script so it doesn"t fail on stop action if fail2ban is not running

debian-releases/etch
Yaroslav Halchenko 19 years ago
parent 6efa9597c9
commit 8ce3c2c19e

@ -30,7 +30,7 @@ case "$1" in
echo -n "Starting $DESC: "
if $0 status >/dev/null
then
$0 status
( $0 status )
exit 1
fi
[ -f $PIDFILE ] && [ ! -d /proc/`cat $PIDFILE` ] && rm -f $PIDFILE
@ -40,15 +40,17 @@ case "$1" in
;;
stop)
echo -n "Stopping $DESC: "
if $0 status >/dev/null
then
fail2banpid=`cat $PIDFILE`
else
( $0 status )
echo "Not stopping fail2ban"
exit 1
fi
start-stop-daemon --stop --quiet --pidfile $PIDFILE
( $0 status >/dev/null )
case "$?" in
0) fail2banpid=`cat $PIDFILE` ;;
3) echo "done"; exit 0;;
*)
( $0 status )
echo "Not stopping fail2ban"
exit 1
esac
start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE
maxsecs=30
i=0
while [ -f $PIDFILE ] && [ -d /proc/$fail2banpid ] \

9
debian/changelog vendored

@ -1,3 +1,12 @@
fail2ban (0.5.4-9) unstable; urgency=low
* Fixed init.d script so it doesn't return non-0 status if fail2ban is not
running. That fixes issues with purging the package and leaving garbage in
/usr/share/fail2ban (Thanx to Justin Pryzby for the insight)
(closes: #337223)
-- Yaroslav Halchenko <debian@onerussian.com> Thu, 3 Nov 2005 17:05:20 -0500
fail2ban (0.5.4-8) unstable; urgency=low
* Added config option MAIL.localtime (closes: #336449)

Loading…
Cancel
Save