- Configuration path was hardcoded. Use the "-c" value instead

git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@289 a942ae1a-1317-0410-a47c-b1dcaea8d605
0.x
Cyril Jaquier 2006-08-22 22:00:50 +00:00
parent acf3b52e18
commit 887fbc840f
1 changed files with 5 additions and 2 deletions

View File

@ -49,6 +49,7 @@ class Fail2banClient:
self.argv = None
self.stream = None
self.conf = dict()
self.conf["conf"] = "/etc/fail2ban"
self.conf["dump"] = False
self.conf["force"] = False
self.conf["verbose"] = 2
@ -95,7 +96,9 @@ class Fail2banClient:
""" Gets the command line options
"""
for opt in optList:
if opt[0] == "-d":
if opt[0] == "-c":
self.conf["conf"] = opt[1]
elif opt[0] == "-d":
self.conf["dump"] = True
elif opt[0] == "-v":
self.conf["verbose"] = self.conf["verbose"] + 1
@ -240,7 +243,7 @@ class Fail2banClient:
def readConfig(self):
# Read the configuration
cfg = Configurator()
cfg.setBaseDir("config")
cfg.setBaseDir(self.conf["conf"])
cfg.readAll()
cfg.getAllOptions()
cfg.convertToProtocol()