- 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
_tent/ipv6_via_aInfo
Cyril Jaquier 17 years ago
parent 19d251d785
commit b174a2e858

@ -14,6 +14,8 @@ ver. 0.8.3 (2008/??/??) - stable
Thanks to Yaroslav Halchenko.
- Fixed socket path in redhat and suse init script. Thanks to
Jim Wight.
- 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
----------

@ -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…
Cancel
Save