From b046e73bef947d21a0db0ea66f378474fc68d232 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Thu, 29 Sep 2005 15:35:56 +0000 Subject: [PATCH] added reporting of the enabled sections --- debian/changelog | 6 ++++++ fail2ban.py | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index afb7a7f5..072cf1ca 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +fail2ban (0.5.4-4) unstable; urgency=low + + * On a request from Calum Mackay added reporting of the enabled sections + + -- Yaroslav Halchenko Thu, 29 Sep 2005 11:20:43 -1000 + fail2ban (0.5.4-3) unstable; urgency=low * Resolved the mistery of debug mode in which commands are not really diff --git a/fail2ban.py b/fail2ban.py index af6fe4e4..f00f9f52 100755 --- a/fail2ban.py +++ b/fail2ban.py @@ -352,11 +352,15 @@ def main(): ["str", "fwban", ""], ["str", "fwunban", ""]) + logSys.info("Fail2Ban v" + version + " is running") + + enabledSections = "" # Gets the options of each sections for t in confReader.getSections(): l = confReader.getLogOptions(t, optionValues) if l["enabled"]: # Creates a logreader object + enabledSections += " %s"%t lObj = LogReader(l["logfile"], l["timeregex"], l["timepattern"], l["failregex"], l["maxfailures"], l["findtime"]) # Creates a firewall object @@ -365,6 +369,8 @@ def main(): # with this :/ logFwList.append([t, lObj, fObj, dict(), l]) + logSys.info("Sections [%s] are enabled"%t) + # We add 127.0.0.1 to the ignore list has we do not want # to be ban ourself. for element in logFwList: @@ -378,7 +384,6 @@ def main(): else: logSys.warn(ip + " is not a valid IP address") - logSys.info("Fail2Ban v" + version + " is running") # Execute global start command executeCmd(conf["cmdstart"], conf["debug"]) # Execute start command of each section