|
|
|
@ -42,7 +42,17 @@ protocol = [
|
|
|
|
|
["get logtarget", "gets logging target"],
|
|
|
|
|
['', ''],
|
|
|
|
|
["add <JAIL> <BACKEND>", "creates <JAIL> using <BACKEND>"],
|
|
|
|
|
["set <JAIL> <CMD>", "sets the <CMD> value for <JAIL>"],
|
|
|
|
|
['', ''],
|
|
|
|
|
["set <JAIL> idle on|off", "sets the idle state of <JAIL>"],
|
|
|
|
|
["set <JAIL> addignoreip <IP>", "adds <IP> to the ignore list of <JAIL>"],
|
|
|
|
|
["set <JAIL> delignoreip <IP>", "removes <IP> from the ignore list of <JAIL>"],
|
|
|
|
|
["set <JAIL> addlogpath <FILE>", "adds <FILE> to the monitoring list of <JAIL>"],
|
|
|
|
|
["set <JAIL> dellogpath <FILE>", "removes <FILE> to the monitoring list of <JAIL>"],
|
|
|
|
|
["set <JAIL> timeregex <REGEX>", "sets the regular expression <REGEX> to match the date format for <JAIL>"],
|
|
|
|
|
["set <JAIL> timepattern <PATTERN>", "sets the pattern <PATTERN> to match the date format for <JAIL>"],
|
|
|
|
|
["set <JAIL> failregex <REGEX>", "sets the regular expression <REGEX> which must match failures for <JAIL>"],
|
|
|
|
|
["set <JAIL> ignoreregex <REGEX>", "sets the regular expression <REGEX> which should match pattern to exclude for <JAIL>"],
|
|
|
|
|
['', ''],
|
|
|
|
|
["get <JAIL> <CMD>", "gets the <CMD> value for <JAIL>"],
|
|
|
|
|
['', ''],
|
|
|
|
|
["start <JAIL>", "starts <JAIL>"],
|
|
|
|
@ -56,11 +66,16 @@ protocol = [
|
|
|
|
|
|
|
|
|
|
def printFormatted():
|
|
|
|
|
INDENT=4
|
|
|
|
|
FIRST=30
|
|
|
|
|
WIDTH=75
|
|
|
|
|
for command in [' ' * INDENT + m[0] +
|
|
|
|
|
"\n".join(textwrap.wrap(m[1], WIDTH - INDENT,
|
|
|
|
|
initial_indent=' ' * (FIRST - len(m[0])),
|
|
|
|
|
subsequent_indent=' ' * (FIRST + INDENT)))
|
|
|
|
|
for m in protocol]:
|
|
|
|
|
print command
|
|
|
|
|
MARGIN=35
|
|
|
|
|
WIDTH=40
|
|
|
|
|
for m in protocol:
|
|
|
|
|
if m[0] == '':
|
|
|
|
|
print
|
|
|
|
|
first = True
|
|
|
|
|
for n in textwrap.wrap(m[1], WIDTH):
|
|
|
|
|
if first:
|
|
|
|
|
n = ' ' * INDENT + m[0] + ' ' * (MARGIN - len(m[0])) + n
|
|
|
|
|
first = False
|
|
|
|
|
else:
|
|
|
|
|
n = ' ' * (INDENT + MARGIN) + n
|
|
|
|
|
print n
|
|
|
|
|