mirror of https://github.com/fail2ban/fail2ban
small amend for d1b7e2b5fb2b389d04845369d7d29db65425dcf2: double usage string removed, spacing fixed
generate-man: small fixing (avoid ../bin in usage, version fixpull/2601/head
parent
f77398c49d
commit
4e4bd43e5e
|
@ -108,7 +108,8 @@ usage = lambda: "%s [OPTIONS] <LOG> <REGEX> [IGNOREREGEX]" % sys.argv[0]
|
||||||
class _f2bOptParser(OptionParser):
|
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."""
|
||||||
return usage() + __doc__ + """
|
self.usage = ''
|
||||||
|
return "Usage: " + usage() + __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)
|
||||||
|
@ -121,7 +122,7 @@ REGEX:
|
||||||
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)
|
||||||
""" + 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"
|
||||||
|
|
||||||
|
|
|
@ -3,12 +3,14 @@
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
export PYTHONPATH=..
|
export PYTHONPATH=..
|
||||||
|
export PATH="../bin:$PATH"
|
||||||
|
|
||||||
f2bversion=$(../bin/fail2ban-client --version | head -n1 | sed -e 's,.* v,,g')
|
f2bversion=$(fail2ban-client -V)
|
||||||
|
echo "Generating man for $f2bversion ..."
|
||||||
|
|
||||||
# fail2ban-client
|
# fail2ban-client
|
||||||
echo -n "Generating fail2ban-client "
|
echo -n "Generating fail2ban-client "
|
||||||
help2man --section=1 --no-info --include=fail2ban-client.h2m --output fail2ban-client.1 ../bin/fail2ban-client
|
help2man --section=1 --no-info --include=fail2ban-client.h2m --output fail2ban-client.1 fail2ban-client
|
||||||
echo "[done]"
|
echo "[done]"
|
||||||
echo -n "Patching fail2ban-client "
|
echo -n "Patching fail2ban-client "
|
||||||
# Changes the title.
|
# Changes the title.
|
||||||
|
@ -39,22 +41,22 @@ echo "[done]"
|
||||||
|
|
||||||
# fail2ban-python
|
# fail2ban-python
|
||||||
echo -n "Generating fail2ban-python "
|
echo -n "Generating fail2ban-python "
|
||||||
help2man --version-string=f2bversion --section=1 --no-info --include=fail2ban-python.h2m --output fail2ban-python.1 ../bin/fail2ban-python
|
help2man --version-string=$f2bversion --section=1 --no-info --include=fail2ban-python.h2m --output fail2ban-python.1 fail2ban-python
|
||||||
echo "[done]"
|
echo "[done]"
|
||||||
|
|
||||||
# fail2ban-server
|
# fail2ban-server
|
||||||
echo -n "Generating fail2ban-server "
|
echo -n "Generating fail2ban-server "
|
||||||
help2man --section=1 --no-info --include=fail2ban-server.h2m --output fail2ban-server.1 ../bin/fail2ban-server
|
help2man --section=1 --no-info --include=fail2ban-server.h2m --output fail2ban-server.1 fail2ban-server
|
||||||
echo "[done]"
|
echo "[done]"
|
||||||
|
|
||||||
# fail2ban-testcases
|
# fail2ban-testcases
|
||||||
echo -n "Generating fail2ban-testcases "
|
echo -n "Generating fail2ban-testcases "
|
||||||
help2man --section=1 --no-info --include=fail2ban-testcases.h2m --output fail2ban-testcases.1 ../bin/fail2ban-testcases
|
help2man --section=1 --no-info --include=fail2ban-testcases.h2m --output fail2ban-testcases.1 fail2ban-testcases
|
||||||
echo "[done]"
|
echo "[done]"
|
||||||
|
|
||||||
# fail2ban-regex
|
# fail2ban-regex
|
||||||
echo -n "Generating fail2ban-regex "
|
echo -n "Generating fail2ban-regex "
|
||||||
help2man --section=1 --no-info --include=fail2ban-regex.h2m --output fail2ban-regex.1 ../bin/fail2ban-regex
|
help2man --section=1 --no-info --include=fail2ban-regex.h2m --output fail2ban-regex.1 fail2ban-regex
|
||||||
echo "[done]"
|
echo "[done]"
|
||||||
echo -n "Patching fail2ban-regex "
|
echo -n "Patching fail2ban-regex "
|
||||||
# Changes the title.
|
# Changes the title.
|
||||||
|
|
Loading…
Reference in New Issue