status calls would dump all output to /dev/null

pull/808/head
Yaroslav Halchenko 2013-06-19 22:19:40 -04:00
parent b89e6ca770
commit 01d637e9c0
2 changed files with 3 additions and 2 deletions

1
debian/changelog vendored
View File

@ -2,6 +2,7 @@ fail2ban (0.8.10-2) unstable; urgency=low
* debian/fail2ban.init:
- fixed handling of the return code from do_start/do_stop
- status calls would dump all output to /dev/null
-- Yaroslav Halchenko <debian@onerussian.com> Wed, 19 Jun 2013 21:56:01 -0400

View File

@ -132,7 +132,7 @@ do_start()
#
do_status()
{
$DAEMON ping > /dev/null
$DAEMON ping > /dev/null 2>&1
return $?
}
@ -146,7 +146,7 @@ do_stop()
# 1 if daemon was already stopped
# 2 if daemon could not be stopped
# other if a failure occurred
$DAEMON status > /dev/null || return 1
$DAEMON status > /dev/null 2>&1 || return 1
$DAEMON stop > /dev/null || return 2
# now we need actually to wait a bit since it might take time