Browse Source

ENH: add help command

pull/134/head
Daniel Black 12 years ago
parent
commit
7cd6dab7f0
  1. 1
      common/protocol.py
  2. 4
      fail2ban-client

1
common/protocol.py

@ -40,6 +40,7 @@ protocol = [
["stop", "stops all jails and terminate the server"],
["status", "gets the current status of the server"],
["ping", "tests if the server is alive"],
["help", "return this output"],
['', "LOGGING", ""],
["set loglevel <LEVEL>", "sets logging level to <LEVEL>. 0 is minimal, 4 is debug"],
["get loglevel", "gets the logging level"],

4
fail2ban-client

@ -380,7 +380,9 @@ class Fail2banClient:
if cmd == "exit" or cmd == "quit":
# Exit
return True
if not cmd == "":
if cmd == "help":
self.dispUsage()
elif not cmd == "":
self.__processCommand(shlex.split(cmd))
except (EOFError, KeyboardInterrupt):
print

Loading…
Cancel
Save