mirror of https://github.com/fail2ban/fail2ban
- Fixed bug with the "socket" option
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@475 a942ae1a-1317-0410-a47c-b1dcaea8d6050.x
parent
136b32c2e1
commit
c27ef35b90
|
@ -25,6 +25,8 @@ ver. 0.7.5 (2006/??/??) - ???
|
||||||
and supported
|
and supported
|
||||||
- Fixed exception when calling fail2ban-server with unknown
|
- Fixed exception when calling fail2ban-server with unknown
|
||||||
option
|
option
|
||||||
|
- Fixed Debian bug 400162. The "socket" option is now handled
|
||||||
|
correctly by fail2ban-client
|
||||||
|
|
||||||
ver. 0.7.4 (2006/11/01) - beta
|
ver. 0.7.4 (2006/11/01) - beta
|
||||||
----------
|
----------
|
||||||
|
|
|
@ -169,7 +169,8 @@ class Fail2banClient:
|
||||||
logSys.error("Server already running")
|
logSys.error("Server already running")
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
self.__startServerAsync(self.__conf["force"])
|
self.__startServerAsync(self.__conf["socket"],
|
||||||
|
self.__conf["force"])
|
||||||
# Read the config while the server is starting
|
# Read the config while the server is starting
|
||||||
self.__readConfig()
|
self.__readConfig()
|
||||||
try:
|
try:
|
||||||
|
@ -199,14 +200,19 @@ class Fail2banClient:
|
||||||
#
|
#
|
||||||
# Start the Fail2ban server in daemon mode.
|
# Start the Fail2ban server in daemon mode.
|
||||||
|
|
||||||
def __startServerAsync(self, force = False):
|
def __startServerAsync(self, socket, force = False):
|
||||||
args = list()
|
args = list()
|
||||||
|
|
||||||
args.append("fail2ban-server")
|
args.append("fail2ban-server")
|
||||||
|
# Start in background mode.
|
||||||
args.append("-b")
|
args.append("-b")
|
||||||
|
# Set the socket path.
|
||||||
|
args.append("-s")
|
||||||
|
args.append(socket)
|
||||||
|
# Force the execution if needed.
|
||||||
if force:
|
if force:
|
||||||
args.append("-x")
|
args.append("-x")
|
||||||
|
print args
|
||||||
pid = os.fork()
|
pid = os.fork()
|
||||||
if pid == 0:
|
if pid == 0:
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue