mirror of
https://github.com/fail2ban/fail2ban.git
synced 2026-03-11 08:55:31 +00:00
- Fixed exception if trying to kill Fail2Ban with a fail2ban.pid file present. Thanks to K�vin Drapel
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@99 a942ae1a-1317-0410-a47c-b1dcaea8d605
This commit is contained in:
parent
781564f711
commit
db3a9d9001
1 changed files with 6 additions and 1 deletions
|
|
@ -203,7 +203,12 @@ def killPID(pid):
|
|||
""" Kills the process with the given PID using the
|
||||
INT signal (same effect as <ctrl>+<c>).
|
||||
"""
|
||||
return os.kill(pid, 2)
|
||||
try:
|
||||
return os.kill(pid, 2)
|
||||
except OSError:
|
||||
logSys.error("Can not kill process " + `pid` + ". Please check that " +
|
||||
"Fail2Ban is not running and remove the file " +
|
||||
"'/tmp/fail2ban.pid'")
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue