mirror of https://github.com/fail2ban/fail2ban
added reporting of the enabled sections: unified it a bit with the rest
parent
b046e73bef
commit
897018932b
|
@ -354,13 +354,13 @@ def main():
|
||||||
|
|
||||||
logSys.info("Fail2Ban v" + version + " is running")
|
logSys.info("Fail2Ban v" + version + " is running")
|
||||||
|
|
||||||
enabledSections = ""
|
enabledSections = []
|
||||||
# Gets the options of each sections
|
# Gets the options of each sections
|
||||||
for t in confReader.getSections():
|
for t in confReader.getSections():
|
||||||
l = confReader.getLogOptions(t, optionValues)
|
l = confReader.getLogOptions(t, optionValues)
|
||||||
if l["enabled"]:
|
if l["enabled"]:
|
||||||
# Creates a logreader object
|
# Creates a logreader object
|
||||||
enabledSections += " %s"%t
|
enabledSections.append(t)
|
||||||
lObj = LogReader(l["logfile"], l["timeregex"], l["timepattern"],
|
lObj = LogReader(l["logfile"], l["timeregex"], l["timepattern"],
|
||||||
l["failregex"], l["maxfailures"], l["findtime"])
|
l["failregex"], l["maxfailures"], l["findtime"])
|
||||||
# Creates a firewall object
|
# Creates a firewall object
|
||||||
|
@ -369,7 +369,7 @@ def main():
|
||||||
# with this :/
|
# with this :/
|
||||||
logFwList.append([t, lObj, fObj, dict(), l])
|
logFwList.append([t, lObj, fObj, dict(), l])
|
||||||
|
|
||||||
logSys.info("Sections [%s] are enabled"%t)
|
logSys.info("Sections %s are enabled"%enabledSections)
|
||||||
|
|
||||||
# We add 127.0.0.1 to the ignore list has we do not want
|
# We add 127.0.0.1 to the ignore list has we do not want
|
||||||
# to be ban ourself.
|
# to be ban ourself.
|
||||||
|
|
Loading…
Reference in New Issue