From 01d637e9c015f68ebeab87114cb9c75b7e52e08e Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 19 Jun 2013 22:19:40 -0400 Subject: [PATCH] status calls would dump all output to /dev/null --- debian/changelog | 1 + debian/fail2ban.init | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 5580087d..cad397bb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Wed, 19 Jun 2013 21:56:01 -0400 diff --git a/debian/fail2ban.init b/debian/fail2ban.init index 97f767c6..98e7216a 100755 --- a/debian/fail2ban.init +++ b/debian/fail2ban.init @@ -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