- Search "fail2ban-server" using PATH and if it fails,

use the current directory

git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@305 a942ae1a-1317-0410-a47c-b1dcaea8d605
0.x
Cyril Jaquier 19 years ago
parent 5c6e05f922
commit 89b034b676

@ -194,7 +194,16 @@ class Fail2banClient:
pid = os.fork() pid = os.fork()
if pid == 0: if pid == 0:
os.execv("fail2ban-server", args) try:
# Use the PATH env
os.execvp("fail2ban-server", args)
except OSError:
try:
# Use the current directory
os.execv("fail2ban-server", args)
except OSError:
print "Could not find fail2ban-server"
os.exit(-1)
def waitOnServer(self): def waitOnServer(self):

Loading…
Cancel
Save