added reporting of the enabled sections

debian-releases/etch
Yaroslav Halchenko 2005-09-29 15:35:56 +00:00
parent a1d7835cb6
commit b046e73bef
2 changed files with 12 additions and 1 deletions

6
debian/changelog vendored
View File

@ -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 <debian@onerussian.com> 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

View File

@ -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