From c10e1bb7ff530c138bfb344faa5478df6cd7755b Mon Sep 17 00:00:00 2001 From: Cyril Jaquier Date: Sun, 19 Nov 2006 21:26:47 +0000 Subject: [PATCH] - Fixed exception when passing unknown command line option git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@472 a942ae1a-1317-0410-a47c-b1dcaea8d605 --- fail2ban-server | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/fail2ban-server b/fail2ban-server index 1f022d139..7602bd85f 100755 --- a/fail2ban-server +++ b/fail2ban-server @@ -71,15 +71,16 @@ class Fail2banServer: print "and bans the corresponding IP addresses using firewall rules." print print "Only use this command for debugging purpose. Start the server with" - print "fail2ban-client instead." + print "fail2ban-client instead. The default behaviour is to start the server" + print "in background." print print "Options:" - print " -b start in background" - print " -f start in foreground" - print " -s socket path" - print " -x force execution of the server" - print " -h, --help display this help message" - print " -V, --version print the version" + print " -b start in background" + print " -f start in foreground" + print " -s socket path" + print " -x force execution of the server" + print " -h, --help display this help message" + print " -V, --version print the version" print print "Report bugs to " @@ -113,6 +114,7 @@ class Fail2banServer: optList, args = getopt.getopt(self.__argv[1:], cmdOpts, cmdLongOpts) except getopt.GetoptError: self.dispUsage() + sys.exit(-1) self.__getCmdLineOptions(optList)