From 887fbc840fcb60e456891f5b89a7b62894a848e2 Mon Sep 17 00:00:00 2001 From: Cyril Jaquier Date: Tue, 22 Aug 2006 22:00:50 +0000 Subject: [PATCH] - 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 --- fail2ban-client | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fail2ban-client b/fail2ban-client index ec8b315d..ccde6c25 100755 --- a/fail2ban-client +++ b/fail2ban-client @@ -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()