Codebase list fail2ban / b046e73
added reporting of the enabled sections Yaroslav Halchenko 18 years ago
2 changed file(s) with 12 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
0 fail2ban (0.5.4-4) unstable; urgency=low
1
2 * On a request from Calum Mackay added reporting of the enabled sections
3
4 -- Yaroslav Halchenko <debian@onerussian.com> Thu, 29 Sep 2005 11:20:43 -1000
5
06 fail2ban (0.5.4-3) unstable; urgency=low
17
28 * Resolved the mistery of debug mode in which commands are not really
351351 ["str", "fwban", ""],
352352 ["str", "fwunban", ""])
353353
354 logSys.info("Fail2Ban v" + version + " is running")
355
356 enabledSections = ""
354357 # Gets the options of each sections
355358 for t in confReader.getSections():
356359 l = confReader.getLogOptions(t, optionValues)
357360 if l["enabled"]:
358361 # Creates a logreader object
362 enabledSections += " %s"%t
359363 lObj = LogReader(l["logfile"], l["timeregex"], l["timepattern"],
360364 l["failregex"], l["maxfailures"], l["findtime"])
361365 # Creates a firewall object
363367 # Links them into a list. I'm not really happy
364368 # with this :/
365369 logFwList.append([t, lObj, fObj, dict(), l])
370
371 logSys.info("Sections [%s] are enabled"%t)
366372
367373 # We add 127.0.0.1 to the ignore list has we do not want
368374 # to be ban ourself.
377383 else:
378384 logSys.warn(ip + " is not a valid IP address")
379385
380 logSys.info("Fail2Ban v" + version + " is running")
381386 # Execute global start command
382387 executeCmd(conf["cmdstart"], conf["debug"])
383388 # Execute start command of each section