mirror of https://github.com/fail2ban/fail2ban
- Fixed PID file while started in daemon mode. Thanks to Christian Jobic who submitted a similar patch.
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_8@680 a942ae1a-1317-0410-a47c-b1dcaea8d605 Conflicts: ChangeLogdebian-releases/squeeze
parent
9db84ab727
commit
dc9919aed0
|
@ -7,6 +7,11 @@
|
|||
Fail2Ban (version 0.8.2) 2008/03/06
|
||||
=============================================================
|
||||
|
||||
From ver. 0.8.3 (2008/??/??) - stable
|
||||
----------
|
||||
- Fixed PID file while started in daemon mode. Thanks to
|
||||
Christian Jobic who submitted a similar patch.
|
||||
|
||||
ver. 0.8.2 (2008/03/06) - stable
|
||||
----------
|
||||
- Fixed named filter. Thanks to Yaroslav Halchenko
|
||||
|
|
|
@ -59,15 +59,6 @@ class Server:
|
|||
def start(self, sock, force = False):
|
||||
logSys.info("Starting Fail2ban v" + version.version)
|
||||
|
||||
# Creates a PID file.
|
||||
try:
|
||||
logSys.debug("Creating PID file %s" % Server.PID_FILE)
|
||||
pidFile = open(Server.PID_FILE, 'w')
|
||||
pidFile.write("%s\n" % os.getpid())
|
||||
pidFile.close()
|
||||
except IOError, e:
|
||||
logSys.error("Unable to create PID file: %s" % e)
|
||||
|
||||
# Install signal handlers
|
||||
signal.signal(signal.SIGTERM, self.__sigTERMhandler)
|
||||
signal.signal(signal.SIGINT, self.__sigTERMhandler)
|
||||
|
@ -81,6 +72,16 @@ class Server:
|
|||
else:
|
||||
logSys.error("Could not create daemon")
|
||||
raise ServerInitializationError("Could not create daemon")
|
||||
|
||||
# Creates a PID file.
|
||||
try:
|
||||
logSys.debug("Creating PID file %s" % Server.PID_FILE)
|
||||
pidFile = open(Server.PID_FILE, 'w')
|
||||
pidFile.write("%s\n" % os.getpid())
|
||||
pidFile.close()
|
||||
except IOError, e:
|
||||
logSys.error("Unable to create PID file: %s" % e)
|
||||
|
||||
# Start the communication
|
||||
logSys.debug("Starting communication")
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue