mirror of https://github.com/fail2ban/fail2ban
- Added a cleanup of firewall rules on emergency shutdown when unknown exception is catched. Thanks to Yaroslav Halchenko
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@210 a942ae1a-1317-0410-a47c-b1dcaea8d6050.5
parent
61aa9d917d
commit
6151d11720
6
fail2ban
6
fail2ban
|
@ -55,6 +55,12 @@ except Exception, e:
|
|||
logSys.error("Type: " + `type.__name__` + "\n" +
|
||||
"Value: " + `e.args` + "\n" +
|
||||
"TB: " + `tbStack`)
|
||||
# Try to clean up after ourselves
|
||||
# just for extreme caution - wrapping with try
|
||||
try:
|
||||
fail2ban.restoreFwRules()
|
||||
except Exception:
|
||||
pass
|
||||
# Remove the PID lock file. Should close #1239562
|
||||
pidLock.remove()
|
||||
logging.shutdown()
|
||||
|
|
Loading…
Reference in New Issue