- Fixed bug with the "socket" option

git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@475 a942ae1a-1317-0410-a47c-b1dcaea8d605
0.x
Cyril Jaquier 2006-11-26 22:22:54 +00:00
parent 136b32c2e1
commit c27ef35b90
2 changed files with 11 additions and 3 deletions

View File

@ -25,6 +25,8 @@ ver. 0.7.5 (2006/??/??) - ???
and supported
- Fixed exception when calling fail2ban-server with unknown
option
- Fixed Debian bug 400162. The "socket" option is now handled
correctly by fail2ban-client
ver. 0.7.4 (2006/11/01) - beta
----------

View File

@ -169,7 +169,8 @@ class Fail2banClient:
logSys.error("Server already running")
return False
else:
self.__startServerAsync(self.__conf["force"])
self.__startServerAsync(self.__conf["socket"],
self.__conf["force"])
# Read the config while the server is starting
self.__readConfig()
try:
@ -199,14 +200,19 @@ class Fail2banClient:
#
# Start the Fail2ban server in daemon mode.
def __startServerAsync(self, force = False):
def __startServerAsync(self, socket, force = False):
args = list()
args.append("fail2ban-server")
# Start in background mode.
args.append("-b")
# Set the socket path.
args.append("-s")
args.append(socket)
# Force the execution if needed.
if force:
args.append("-x")
print args
pid = os.fork()
if pid == 0:
try: