small amend (simplifying formatted help and man)

pull/2842/head^2^2
sebres 2020-09-23 19:35:17 +02:00
parent f518d42c59
commit 24093de32d
2 changed files with 18 additions and 13 deletions

View File

@ -21,7 +21,6 @@ Fail2Ban reads log file that contains password failure report
and bans the corresponding IP addresses using firewall rules. and bans the corresponding IP addresses using firewall rules.
This tools can test regular expressions for "fail2ban". This tools can test regular expressions for "fail2ban".
""" """
__author__ = "Fail2Ban Developers" __author__ = "Fail2Ban Developers"
@ -109,21 +108,22 @@ class _f2bOptParser(OptionParser):
def format_help(self, *args, **kwargs): def format_help(self, *args, **kwargs):
""" Overwritten format helper with full ussage.""" """ Overwritten format helper with full ussage."""
self.usage = '' self.usage = ''
return "Usage: " + usage() + __doc__ + """ return "Usage: " + usage() + "\n" + __doc__ + """
LOG: LOG:
string a string representing a log line string a string representing a log line
filename path to a log file (/var/log/auth.log) filename path to a log file (/var/log/auth.log)
"systemd-journal" search systemd journal. Optionally specify systemd-journal search systemd journal (systemd-python required),
`systemd-journal[journalflags=X]` to determine optionally with backend parameters, see `man jail.conf`
which journals are used (systemd-python required) for usage and examples (systemd-journal[journalflags=1]).
REGEX: REGEX:
string a string representing a 'failregex' string a string representing a 'failregex'
filename path to a filter file (filter.d/sshd.conf) filter name of filter, optionally with options (sshd[mode=aggressive])
filename path to a filter file (filter.d/sshd.conf)
IGNOREREGEX: IGNOREREGEX:
string a string representing an 'ignoreregex' string a string representing an 'ignoreregex'
filename path to a filter file (filter.d/sshd.conf) filename path to a filter file (filter.d/sshd.conf)
\n""" + OptionParser.format_help(self, *args, **kwargs) + """\n \n""" + OptionParser.format_help(self, *args, **kwargs) + """\n
Report bugs to https://github.com/fail2ban/fail2ban/issues\n Report bugs to https://github.com/fail2ban/fail2ban/issues\n
""" + __copyright__ + "\n" """ + __copyright__ + "\n"

View File

@ -18,13 +18,18 @@ a string representing a log line
filename filename
path to a log file (\fI\,/var/log/auth.log\/\fP) path to a log file (\fI\,/var/log/auth.log\/\fP)
.TP .TP
"systemd\-journal" systemd\-journal
search systemd journal (systemd\-python required) search systemd journal (systemd\-python required),
optionally with backend parameters, see `man jail.conf`
for usage and examples (systemd\-journal[journalflags=1]).
.SS "REGEX:" .SS "REGEX:"
.TP .TP
string string
a string representing a 'failregex' a string representing a 'failregex'
.TP .TP
filter
name of filter, optionally with options (sshd[mode=aggressive])
.TP
filename filename
path to a filter file (filter.d/sshd.conf) path to a filter file (filter.d/sshd.conf)
.SS "IGNOREREGEX:" .SS "IGNOREREGEX:"