v0.27.0 packaging update
This commit is contained in:
1 parent
b5ac9084c7
commit
60abc97eb0
17 files changed
+1194
-43
No files matched your search
@@ -0,0 +1,191 @@
|
||||
#compdef lw
|
||||
# zsh completion for lw. Generated by make completion from lw's own tables: edit cmd/lw, not this file.
|
||||
|
||||
local -a described
|
||||
case ${words[2]}:$CURRENT in
|
||||
auth:2) ;;
|
||||
auth:3)
|
||||
described=(
|
||||
'add-user:Add a user to a credentials file, or replace its password'
|
||||
'remove-user:Remove a user from a credentials file'
|
||||
'token:Log in to an http sink or http_chain source and print a bearer token'
|
||||
'stream:Log in to a tcp sink and copy its stream to stdout until interrupted'
|
||||
)
|
||||
_describe -t commands 'lw auth command' described
|
||||
return ;;
|
||||
auth:*)
|
||||
shift 2 words
|
||||
(( CURRENT -= 2 ))
|
||||
case ${words[1]} in
|
||||
add-user) _arguments -S \
|
||||
'--credentials=[credentials file, created when missing]:value:_default' \
|
||||
'--generate[generate a new password, replacing any --password-file; needed to rotate without one]' \
|
||||
'--password-file=[read the password from file when it exists, else write a generated one there]:value:_default' \
|
||||
'(-u --user)'{-u=,--user=}'[user name]:value:_default' \
|
||||
'(-h --help)'{-h,--help}'[print the flags]' ;;
|
||||
remove-user) _arguments -S \
|
||||
'--credentials=[credentials file]:value:_default' \
|
||||
'(-u --user)'{-u=,--user=}'[user name]:value:_default' \
|
||||
'(-h --help)'{-h,--help}'[print the flags]' ;;
|
||||
token) _arguments -S \
|
||||
'--ca-file=[CA file that verifies the server (default: system roots)]:value:_default' \
|
||||
'--cert-file=[client certificate file, for listeners with tls.client_auth]:value:_default' \
|
||||
'--key-file=[client key file]:value:_default' \
|
||||
'--password-file=[file holding the password]:value:_default' \
|
||||
'--pin-sha256=[sha256//BASE64 pin of the server key, in place of --ca-file (a self_signed listener logs it)]:value:_default' \
|
||||
'--server-name=[name the server certificate must carry (default: the host)]:value:_default' \
|
||||
'--unbound[log in without channel binding, to an http sink behind a TLS-terminating proxy (auth.trusted_proxies)]' \
|
||||
'--url=[listener URL, https://HOST:PORT or https://[IPV6\]:PORT (with --unbound, a proxy'\''s mount URL may carry a path)]:value:_default' \
|
||||
'(-u --user)'{-u=,--user=}'[user name]:value:_default' \
|
||||
'(-h --help)'{-h,--help}'[print the flags]' ;;
|
||||
stream) _arguments -S \
|
||||
'--addr=[tcp sink address, HOST:PORT or [IPV6\]:PORT]:value:_default' \
|
||||
'--ca-file=[CA file that verifies the server (default: system roots)]:value:_default' \
|
||||
'--cert-file=[client certificate file, for listeners with tls.client_auth]:value:_default' \
|
||||
'--key-file=[client key file]:value:_default' \
|
||||
'--password-file=[file holding the password]:value:_default' \
|
||||
'--pin-sha256=[sha256//BASE64 pin of the server key, in place of --ca-file (a self_signed listener logs it)]:value:_default' \
|
||||
'--server-name=[name the server certificate must carry (default: the host)]:value:_default' \
|
||||
'(-u --user)'{-u=,--user=}'[user name]:value:_default' \
|
||||
'(-h --help)'{-h,--help}'[print the flags]' ;;
|
||||
esac
|
||||
return ;;
|
||||
tls:2) ;;
|
||||
tls:3)
|
||||
described=(
|
||||
'ca:Create a certificate authority, DIR/ca.crt and DIR/ca.key, that signs certificates only'
|
||||
'cert:Issue a certificate and key, OUT/NAME.crt and OUT/NAME.key, from DIR/ca.crt and DIR/ca.key'
|
||||
)
|
||||
_describe -t commands 'lw tls command' described
|
||||
return ;;
|
||||
tls:*)
|
||||
shift 2 words
|
||||
(( CURRENT -= 2 ))
|
||||
case ${words[1]} in
|
||||
ca) _arguments -S \
|
||||
'--days=[validity in n days]:value:_default' \
|
||||
'--dir=[directory to write ca.crt and ca.key in, created when missing]:directory:_files -/' \
|
||||
'--name=[subject common name]:value:_default' \
|
||||
'(-h --help)'{-h,--help}'[print the flags]' ;;
|
||||
cert) _arguments -S \
|
||||
'--ca-dir=[directory holding ca.crt and ca.key (lw tls ca)]:directory:_files -/' \
|
||||
'--client[for dialers presenting a certificate (TLS client authentication)]' \
|
||||
'--days=[validity in n days, at most the CA'\''s]:value:_default' \
|
||||
'--hosts=[DNS names and IP addresses, '\'','\'' between them (default with --server: --name)]:value:_default' \
|
||||
'--name=[subject common name, the mtls identity, and the file names]:value:_default' \
|
||||
'--out=[directory to write in (default: --ca-dir)]:directory:_files -/' \
|
||||
'--server[for listeners (TLS server authentication)]' \
|
||||
'(-h --help)'{-h,--help}'[print the flags]' ;;
|
||||
esac
|
||||
return ;;
|
||||
preset:2) ;;
|
||||
preset:3)
|
||||
described=(
|
||||
'pipe:Standard input to standard output, line for line: lw without a file'
|
||||
'tail:Follow files to standard output, like tail -F'
|
||||
'serve:Serve files or standard input live: a browser viewer at /, SSE at /stream'
|
||||
'edge:Forward files or standard input to an aggregator over TLS, authenticated'
|
||||
'aggregator:Receive from edges over TLS, authenticated, to files or standard output'
|
||||
)
|
||||
_describe -t commands 'lw preset command' described
|
||||
return ;;
|
||||
preset:*)
|
||||
shift 2 words
|
||||
(( CURRENT -= 2 ))
|
||||
case ${words[1]} in
|
||||
pipe) _arguments -S \
|
||||
'--format=[raw|txt|json]:value:_default' \
|
||||
'(-h --help)'{-h,--help}'[print the flags]' ;;
|
||||
tail) _arguments -S \
|
||||
'--format=[raw|txt|json]:value:_default' \
|
||||
'--from=[start|end: where reading a file starts]:value:_default' \
|
||||
'--path=[file, directory (its files) or glob to follow]:value:_default' \
|
||||
'(-h --help)'{-h,--help}'[print the flags]' ;;
|
||||
serve) _arguments -S \
|
||||
'--allow=[addresses or CIDRs that may connect, of listen'\''s family (either behind proxy=); default: all; '\'','\'' between them]:value:_default' \
|
||||
'--cert=[certificate file, for tls=files]:value:_default' \
|
||||
'--deny=[addresses or CIDRs refused, allow or not; '\'','\'' between them]:value:_default' \
|
||||
'--format=[raw|txt|json]:value:_default' \
|
||||
'--from=[start|end: where reading a file starts]:value:_default' \
|
||||
'--hosts=[names and addresses, beyond this host'\''s, of a self or issuer certificate; '\'','\'' between them]:value:_default' \
|
||||
'--issuer_cert=[CA certificate file (lw tls ca), for tls=issuer]:value:_default' \
|
||||
'--issuer_key=[CA key file, for tls=issuer]:value:_default' \
|
||||
'--key=[key file, for tls=files]:value:_default' \
|
||||
'--listen=[HOST:PORT; [IPV6\]:PORT]:value:_default' \
|
||||
'--path=[file, directory (its files) or glob to follow; default: standard input]:value:_default' \
|
||||
'--proxy=[addresses or CIDRs of the TLS-terminating proxies browsers come through; '\'','\'' between them]:value:_default' \
|
||||
'--tls=[off|self|issuer|files: a certificate made at startup (self-signed or from issuer_*), or files]:value:_default' \
|
||||
'--users=[credentials file (lw auth add-user): readers log in with SCRAM]:value:_default' \
|
||||
'--viewer=[true: the login page and viewer for users, behind proxy; without users the viewer is always on]:value:_default' \
|
||||
'(-h --help)'{-h,--help}'[print the flags]' ;;
|
||||
edge) _arguments -S \
|
||||
'--ca=[CA file that verifies the aggregator; default: system roots]:value:_default' \
|
||||
'--cert=[client certificate file, for an aggregator with client_ca]:value:_default' \
|
||||
'--from=[start|end: where reading a file starts]:value:_default' \
|
||||
'--key=[client key file]:value:_default' \
|
||||
'--node=[origin label; default: this host'\''s name]:value:_default' \
|
||||
'--password_file=[file holding the SCRAM password]:value:_default' \
|
||||
'--path=[file, directory (its files) or glob to follow; default: standard input]:value:_default' \
|
||||
'--pin=[sha256//BASE64 of the aggregator'\''s key, which it logs with tls=self]:value:_default' \
|
||||
'--server_name=[name the aggregator'\''s certificate carries; default: to'\''s host]:value:_default' \
|
||||
'--to=[the aggregator'\''s HOST:PORT; [IPV6\]:PORT]:value:_default' \
|
||||
'--transport=[tcp|http: tcp_chain or http_chain]:value:_default' \
|
||||
'(-u --user)'{-u=,--user=}'[SCRAM user (lw auth add-user on the aggregator)]:value:_default' \
|
||||
'(-h --help)'{-h,--help}'[print the flags]' ;;
|
||||
aggregator) _arguments -S \
|
||||
'--allow=[addresses or CIDRs that may connect, of listen'\''s family (either behind proxy=); default: all; '\'','\'' between them]:value:_default' \
|
||||
'--cert=[certificate file, for tls=files]:value:_default' \
|
||||
'--client_ca=[CA file that verifies edge certificates (mTLS)]:value:_default' \
|
||||
'--deny=[addresses or CIDRs refused, allow or not; '\'','\'' between them]:value:_default' \
|
||||
'--format=[raw|txt|json]:value:_default' \
|
||||
'--hosts=[names and addresses, beyond this host'\''s, of a self or issuer certificate; '\'','\'' between them]:value:_default' \
|
||||
'--issuer_cert=[CA certificate file (lw tls ca), for tls=issuer]:value:_default' \
|
||||
'--issuer_key=[CA key file, for tls=issuer]:value:_default' \
|
||||
'--key=[key file, for tls=files]:value:_default' \
|
||||
'--listen=[HOST:PORT; [IPV6\]:PORT; [::\] for IPv6 only]:value:_default' \
|
||||
'--out=[directory for the received entries; default: standard output]:value:_default' \
|
||||
'--tls=[self|issuer|files: a certificate made at startup (self-signed or from issuer_*), or files]:value:_default' \
|
||||
'--transport=[tcp|http: tcp_chain or http_chain]:value:_default' \
|
||||
'--users=[credentials file (lw auth add-user): edges log in with SCRAM]:value:_default' \
|
||||
'(-h --help)'{-h,--help}'[print the flags]' ;;
|
||||
esac
|
||||
return ;;
|
||||
esac
|
||||
if (( CURRENT == 2 )) && [[ $PREFIX != -* ]]; then
|
||||
described=(
|
||||
'auth:SCRAM users, bearer tokens, tcp sink viewing'
|
||||
'tls:A CA and certificates for TLS and mTLS'
|
||||
'preset:Show the pipeline a preset makes, as TOML'
|
||||
'help:Print the help and exit'
|
||||
)
|
||||
_describe -t commands 'lw command' described
|
||||
return
|
||||
fi
|
||||
_arguments -S \
|
||||
'--auto_reload' \
|
||||
'(-t --check)'{-t,--check} \
|
||||
'--color' \
|
||||
'(-c --config)'{-c=,--config=}':value:_default' \
|
||||
'--dump' \
|
||||
'*--filter=:value:_default' \
|
||||
'*--format=:value:_default' \
|
||||
'*--heartbeat=:value:_default' \
|
||||
'(-h --help)'{-h,--help} \
|
||||
'--logging.console.target=:value:_default' \
|
||||
'--logging.file.directory=:directory:_files -/' \
|
||||
'--logging.file.max_size_mb=:value:_default' \
|
||||
'--logging.file.max_total_size_mb=:value:_default' \
|
||||
'--logging.file.name=:value:_default' \
|
||||
'--logging.file.retention_hours=:value:_default' \
|
||||
'--logging.format=:value:_default' \
|
||||
'--logging.level=:value:_default' \
|
||||
'--logging.output=:value:_default' \
|
||||
'--logging.sanitization=:value:_default' \
|
||||
'*--pipeline=:value:_default' \
|
||||
'*'{-p=,--preset=}':preset:(pipe tail serve edge aggregator)' \
|
||||
'(-q --quiet)'{-q,--quiet} \
|
||||
'*--rate-limit=:value:_default' \
|
||||
'*--sink=:value:_default' \
|
||||
'*--source=:value:_default' \
|
||||
'--status_reporter' \
|
||||
'(-V --version)'{-V,--version}
|
||||
@@ -0,0 +1,95 @@
|
||||
# bash completion for lw. Generated by make completion from lw's own tables: edit cmd/lw, not this file.
|
||||
|
||||
_lw_reply() { compopt -o filenames 2>/dev/null; mapfile -t COMPREPLY < <(compgen "$@" -- "$cur"); }
|
||||
|
||||
_lw() {
|
||||
local cur=${COMP_WORDS[COMP_CWORD]} prev='' i=$COMP_CWORD words
|
||||
((i > 0)) && prev=${COMP_WORDS[i-1]}
|
||||
# bash splits --key=value at '=': complete the value of the key before it
|
||||
if [[ $cur == = ]]; then cur=''
|
||||
elif [[ $prev == = ]]; then prev=${COMP_WORDS[i-2]}
|
||||
fi
|
||||
case ${COMP_WORDS[1]}:$i in
|
||||
*:1) words='--auto_reload --check -t --color --config -c --dump --filter --format --heartbeat --help -h --logging.console.target --logging.file.directory --logging.file.max_size_mb --logging.file.max_total_size_mb --logging.file.name --logging.file.retention_hours --logging.format --logging.level --logging.output --logging.sanitization --pipeline --preset -p --quiet -q --rate-limit --sink --source --status_reporter --version -V auth tls preset help' ;;
|
||||
auth:2) words='add-user remove-user token stream' ;;
|
||||
auth:*)
|
||||
case ${COMP_WORDS[2]} in
|
||||
add-user)
|
||||
case $prev in
|
||||
--credentials|-credentials|--password-file|-password-file|--user|-user|-u) COMPREPLY=(); return ;;
|
||||
esac
|
||||
words='--credentials --generate --password-file --user -u --help -h' ;;
|
||||
remove-user)
|
||||
case $prev in
|
||||
--credentials|-credentials|--user|-user|-u) COMPREPLY=(); return ;;
|
||||
esac
|
||||
words='--credentials --user -u --help -h' ;;
|
||||
token)
|
||||
case $prev in
|
||||
--ca-file|-ca-file|--cert-file|-cert-file|--key-file|-key-file|--password-file|-password-file|--pin-sha256|-pin-sha256|--server-name|-server-name|--url|-url|--user|-user|-u) COMPREPLY=(); return ;;
|
||||
esac
|
||||
words='--ca-file --cert-file --key-file --password-file --pin-sha256 --server-name --unbound --url --user -u --help -h' ;;
|
||||
stream)
|
||||
case $prev in
|
||||
--addr|-addr|--ca-file|-ca-file|--cert-file|-cert-file|--key-file|-key-file|--password-file|-password-file|--pin-sha256|-pin-sha256|--server-name|-server-name|--user|-user|-u) COMPREPLY=(); return ;;
|
||||
esac
|
||||
words='--addr --ca-file --cert-file --key-file --password-file --pin-sha256 --server-name --user -u --help -h' ;;
|
||||
esac ;;
|
||||
tls:2) words='ca cert' ;;
|
||||
tls:*)
|
||||
case ${COMP_WORDS[2]} in
|
||||
ca)
|
||||
case $prev in
|
||||
--dir|-dir) _lw_reply -d; return ;;
|
||||
--days|-days|--name|-name) COMPREPLY=(); return ;;
|
||||
esac
|
||||
words='--days --dir --name --help -h' ;;
|
||||
cert)
|
||||
case $prev in
|
||||
--ca-dir|-ca-dir|--out|-out) _lw_reply -d; return ;;
|
||||
--days|-days|--hosts|-hosts|--name|-name) COMPREPLY=(); return ;;
|
||||
esac
|
||||
words='--ca-dir --client --days --hosts --name --out --server --help -h' ;;
|
||||
esac ;;
|
||||
preset:2) words='pipe tail serve edge aggregator' ;;
|
||||
preset:*)
|
||||
case ${COMP_WORDS[2]} in
|
||||
pipe)
|
||||
case $prev in
|
||||
--format|-format) COMPREPLY=(); return ;;
|
||||
esac
|
||||
words='--format --help -h' ;;
|
||||
tail)
|
||||
case $prev in
|
||||
--format|-format|--from|-from|--path|-path) COMPREPLY=(); return ;;
|
||||
esac
|
||||
words='--format --from --path --help -h' ;;
|
||||
serve)
|
||||
case $prev in
|
||||
--allow|-allow|--cert|-cert|--deny|-deny|--format|-format|--from|-from|--hosts|-hosts|--issuer_cert|-issuer_cert|--issuer_key|-issuer_key|--key|-key|--listen|-listen|--path|-path|--proxy|-proxy|--tls|-tls|--users|-users|--viewer|-viewer) COMPREPLY=(); return ;;
|
||||
esac
|
||||
words='--allow --cert --deny --format --from --hosts --issuer_cert --issuer_key --key --listen --path --proxy --tls --users --viewer --help -h' ;;
|
||||
edge)
|
||||
case $prev in
|
||||
--ca|-ca|--cert|-cert|--from|-from|--key|-key|--node|-node|--password_file|-password_file|--path|-path|--pin|-pin|--server_name|-server_name|--to|-to|--transport|-transport|--user|-user|-u) COMPREPLY=(); return ;;
|
||||
esac
|
||||
words='--ca --cert --from --key --node --password_file --path --pin --server_name --to --transport --user -u --help -h' ;;
|
||||
aggregator)
|
||||
case $prev in
|
||||
--allow|-allow|--cert|-cert|--client_ca|-client_ca|--deny|-deny|--format|-format|--hosts|-hosts|--issuer_cert|-issuer_cert|--issuer_key|-issuer_key|--key|-key|--listen|-listen|--out|-out|--tls|-tls|--transport|-transport|--users|-users) COMPREPLY=(); return ;;
|
||||
esac
|
||||
words='--allow --cert --client_ca --deny --format --hosts --issuer_cert --issuer_key --key --listen --out --tls --transport --users --help -h' ;;
|
||||
esac ;;
|
||||
*)
|
||||
case $prev in
|
||||
--logging.file.directory) _lw_reply -d; return ;;
|
||||
--preset|-p) mapfile -t COMPREPLY < <(compgen -W 'pipe tail serve edge aggregator' -- "$cur"); return ;;
|
||||
--config|-c|--filter|--format|--heartbeat|--logging.console.target|--logging.file.max_size_mb|--logging.file.max_total_size_mb|--logging.file.name|--logging.file.retention_hours|--logging.format|--logging.level|--logging.output|--logging.sanitization|--pipeline|--rate-limit|--sink|--source) COMPREPLY=(); return ;;
|
||||
esac
|
||||
words='--auto_reload --check -t --color --config -c --dump --filter --format --heartbeat --help -h --logging.console.target --logging.file.directory --logging.file.max_size_mb --logging.file.max_total_size_mb --logging.file.name --logging.file.retention_hours --logging.format --logging.level --logging.output --logging.sanitization --pipeline --preset -p --quiet -q --rate-limit --sink --source --status_reporter --version -V' ;;
|
||||
esac
|
||||
mapfile -t COMPREPLY < <(compgen -W "$words" -- "$cur")
|
||||
}
|
||||
|
||||
# An empty reply falls back to file names, as without this script
|
||||
complete -o bashdefault -o default -F _lw lw
|
||||
@@ -0,0 +1,145 @@
|
||||
# fish completion for lw. Generated by make completion from lw's own tables: edit cmd/lw, not this file.
|
||||
|
||||
# __lw_in WORD...: the command line so far is lw WORD...
|
||||
function __lw_in
|
||||
set -l w (commandline -opc)
|
||||
set -l n (math (count $argv) + 1)
|
||||
test (count $w) -ge $n; and test "$w[2..$n]" = "$argv"
|
||||
end
|
||||
|
||||
complete -c lw -f
|
||||
set -l __lw_first 'test (count (commandline -opc)) -eq 1'
|
||||
complete -c lw -n $__lw_first -a auth -d 'SCRAM users, bearer tokens, tcp sink viewing'
|
||||
complete -c lw -n $__lw_first -a tls -d 'A CA and certificates for TLS and mTLS'
|
||||
complete -c lw -n $__lw_first -a preset -d 'Show the pipeline a preset makes, as TOML'
|
||||
complete -c lw -n $__lw_first -a help -d 'Print the help and exit'
|
||||
complete -c lw -n 'not __lw_in auth; and not __lw_in tls; and not __lw_in preset' -l auto_reload
|
||||
complete -c lw -n 'not __lw_in auth; and not __lw_in tls; and not __lw_in preset' -l check -o t
|
||||
complete -c lw -n 'not __lw_in auth; and not __lw_in tls; and not __lw_in preset' -l color
|
||||
complete -c lw -n 'not __lw_in auth; and not __lw_in tls; and not __lw_in preset' -l config -o c -r -F
|
||||
complete -c lw -n 'not __lw_in auth; and not __lw_in tls; and not __lw_in preset' -l dump
|
||||
complete -c lw -n 'not __lw_in auth; and not __lw_in tls; and not __lw_in preset' -l filter -r -F
|
||||
complete -c lw -n 'not __lw_in auth; and not __lw_in tls; and not __lw_in preset' -l format -r -F
|
||||
complete -c lw -n 'not __lw_in auth; and not __lw_in tls; and not __lw_in preset' -l heartbeat -r -F
|
||||
complete -c lw -n 'not __lw_in auth; and not __lw_in tls; and not __lw_in preset' -l help -o h
|
||||
complete -c lw -n 'not __lw_in auth; and not __lw_in tls; and not __lw_in preset' -l logging.console.target -r -F
|
||||
complete -c lw -n 'not __lw_in auth; and not __lw_in tls; and not __lw_in preset' -l logging.file.directory -x -a '(__fish_complete_directories)'
|
||||
complete -c lw -n 'not __lw_in auth; and not __lw_in tls; and not __lw_in preset' -l logging.file.max_size_mb -r -F
|
||||
complete -c lw -n 'not __lw_in auth; and not __lw_in tls; and not __lw_in preset' -l logging.file.max_total_size_mb -r -F
|
||||
complete -c lw -n 'not __lw_in auth; and not __lw_in tls; and not __lw_in preset' -l logging.file.name -r -F
|
||||
complete -c lw -n 'not __lw_in auth; and not __lw_in tls; and not __lw_in preset' -l logging.file.retention_hours -r -F
|
||||
complete -c lw -n 'not __lw_in auth; and not __lw_in tls; and not __lw_in preset' -l logging.format -r -F
|
||||
complete -c lw -n 'not __lw_in auth; and not __lw_in tls; and not __lw_in preset' -l logging.level -r -F
|
||||
complete -c lw -n 'not __lw_in auth; and not __lw_in tls; and not __lw_in preset' -l logging.output -r -F
|
||||
complete -c lw -n 'not __lw_in auth; and not __lw_in tls; and not __lw_in preset' -l logging.sanitization -r -F
|
||||
complete -c lw -n 'not __lw_in auth; and not __lw_in tls; and not __lw_in preset' -l pipeline -r -F
|
||||
complete -c lw -n 'not __lw_in auth; and not __lw_in tls; and not __lw_in preset' -l preset -o p -x -a 'pipe tail serve edge aggregator'
|
||||
complete -c lw -n 'not __lw_in auth; and not __lw_in tls; and not __lw_in preset' -l quiet -o q
|
||||
complete -c lw -n 'not __lw_in auth; and not __lw_in tls; and not __lw_in preset' -l rate-limit -r -F
|
||||
complete -c lw -n 'not __lw_in auth; and not __lw_in tls; and not __lw_in preset' -l sink -r -F
|
||||
complete -c lw -n 'not __lw_in auth; and not __lw_in tls; and not __lw_in preset' -l source -r -F
|
||||
complete -c lw -n 'not __lw_in auth; and not __lw_in tls; and not __lw_in preset' -l status_reporter
|
||||
complete -c lw -n 'not __lw_in auth; and not __lw_in tls; and not __lw_in preset' -l version -o V
|
||||
|
||||
complete -c lw -n '__lw_in auth; and test (count (commandline -opc)) -eq 2' -a add-user -d 'Add a user to a credentials file, or replace its password'
|
||||
complete -c lw -n '__lw_in auth; and test (count (commandline -opc)) -eq 2' -a remove-user -d 'Remove a user from a credentials file'
|
||||
complete -c lw -n '__lw_in auth; and test (count (commandline -opc)) -eq 2' -a token -d 'Log in to an http sink or http_chain source and print a bearer token'
|
||||
complete -c lw -n '__lw_in auth; and test (count (commandline -opc)) -eq 2' -a stream -d 'Log in to a tcp sink and copy its stream to stdout until interrupted'
|
||||
complete -c lw -n '__lw_in auth add-user' -l credentials -r -F -d 'credentials file, created when missing'
|
||||
complete -c lw -n '__lw_in auth add-user' -l generate -d 'generate a new password, replacing any --password-file; needed to rotate without one'
|
||||
complete -c lw -n '__lw_in auth add-user' -l password-file -r -F -d 'read the password from file when it exists, else write a generated one there'
|
||||
complete -c lw -n '__lw_in auth add-user' -l user -o u -r -F -d 'user name'
|
||||
complete -c lw -n '__lw_in auth add-user' -l help -o h -d 'print the flags'
|
||||
complete -c lw -n '__lw_in auth remove-user' -l credentials -r -F -d 'credentials file'
|
||||
complete -c lw -n '__lw_in auth remove-user' -l user -o u -r -F -d 'user name'
|
||||
complete -c lw -n '__lw_in auth remove-user' -l help -o h -d 'print the flags'
|
||||
complete -c lw -n '__lw_in auth token' -l ca-file -r -F -d 'CA file that verifies the server (default: system roots)'
|
||||
complete -c lw -n '__lw_in auth token' -l cert-file -r -F -d 'client certificate file, for listeners with tls.client_auth'
|
||||
complete -c lw -n '__lw_in auth token' -l key-file -r -F -d 'client key file'
|
||||
complete -c lw -n '__lw_in auth token' -l password-file -r -F -d 'file holding the password'
|
||||
complete -c lw -n '__lw_in auth token' -l pin-sha256 -r -F -d 'sha256//BASE64 pin of the server key, in place of --ca-file (a self_signed listener logs it)'
|
||||
complete -c lw -n '__lw_in auth token' -l server-name -r -F -d 'name the server certificate must carry (default: the host)'
|
||||
complete -c lw -n '__lw_in auth token' -l unbound -d 'log in without channel binding, to an http sink behind a TLS-terminating proxy (auth.trusted_proxies)'
|
||||
complete -c lw -n '__lw_in auth token' -l url -r -F -d 'listener URL, https://HOST:PORT or https://[IPV6]:PORT (with --unbound, a proxy\'s mount URL may carry a path)'
|
||||
complete -c lw -n '__lw_in auth token' -l user -o u -r -F -d 'user name'
|
||||
complete -c lw -n '__lw_in auth token' -l help -o h -d 'print the flags'
|
||||
complete -c lw -n '__lw_in auth stream' -l addr -r -F -d 'tcp sink address, HOST:PORT or [IPV6]:PORT'
|
||||
complete -c lw -n '__lw_in auth stream' -l ca-file -r -F -d 'CA file that verifies the server (default: system roots)'
|
||||
complete -c lw -n '__lw_in auth stream' -l cert-file -r -F -d 'client certificate file, for listeners with tls.client_auth'
|
||||
complete -c lw -n '__lw_in auth stream' -l key-file -r -F -d 'client key file'
|
||||
complete -c lw -n '__lw_in auth stream' -l password-file -r -F -d 'file holding the password'
|
||||
complete -c lw -n '__lw_in auth stream' -l pin-sha256 -r -F -d 'sha256//BASE64 pin of the server key, in place of --ca-file (a self_signed listener logs it)'
|
||||
complete -c lw -n '__lw_in auth stream' -l server-name -r -F -d 'name the server certificate must carry (default: the host)'
|
||||
complete -c lw -n '__lw_in auth stream' -l user -o u -r -F -d 'user name'
|
||||
complete -c lw -n '__lw_in auth stream' -l help -o h -d 'print the flags'
|
||||
|
||||
complete -c lw -n '__lw_in tls; and test (count (commandline -opc)) -eq 2' -a ca -d 'Create a certificate authority, DIR/ca.crt and DIR/ca.key, that signs certificates only'
|
||||
complete -c lw -n '__lw_in tls; and test (count (commandline -opc)) -eq 2' -a cert -d 'Issue a certificate and key, OUT/NAME.crt and OUT/NAME.key, from DIR/ca.crt and DIR/ca.key'
|
||||
complete -c lw -n '__lw_in tls ca' -l days -r -F -d 'validity in n days'
|
||||
complete -c lw -n '__lw_in tls ca' -l dir -x -a '(__fish_complete_directories)' -d 'directory to write ca.crt and ca.key in, created when missing'
|
||||
complete -c lw -n '__lw_in tls ca' -l name -r -F -d 'subject common name'
|
||||
complete -c lw -n '__lw_in tls ca' -l help -o h -d 'print the flags'
|
||||
complete -c lw -n '__lw_in tls cert' -l ca-dir -x -a '(__fish_complete_directories)' -d 'directory holding ca.crt and ca.key (lw tls ca)'
|
||||
complete -c lw -n '__lw_in tls cert' -l client -d 'for dialers presenting a certificate (TLS client authentication)'
|
||||
complete -c lw -n '__lw_in tls cert' -l days -r -F -d 'validity in n days, at most the CA\'s'
|
||||
complete -c lw -n '__lw_in tls cert' -l hosts -r -F -d 'DNS names and IP addresses, \',\' between them (default with --server: --name)'
|
||||
complete -c lw -n '__lw_in tls cert' -l name -r -F -d 'subject common name, the mtls identity, and the file names'
|
||||
complete -c lw -n '__lw_in tls cert' -l out -x -a '(__fish_complete_directories)' -d 'directory to write in (default: --ca-dir)'
|
||||
complete -c lw -n '__lw_in tls cert' -l server -d 'for listeners (TLS server authentication)'
|
||||
complete -c lw -n '__lw_in tls cert' -l help -o h -d 'print the flags'
|
||||
|
||||
complete -c lw -n '__lw_in preset; and test (count (commandline -opc)) -eq 2' -a pipe -d 'Standard input to standard output, line for line: lw without a file'
|
||||
complete -c lw -n '__lw_in preset; and test (count (commandline -opc)) -eq 2' -a tail -d 'Follow files to standard output, like tail -F'
|
||||
complete -c lw -n '__lw_in preset; and test (count (commandline -opc)) -eq 2' -a serve -d 'Serve files or standard input live: a browser viewer at /, SSE at /stream'
|
||||
complete -c lw -n '__lw_in preset; and test (count (commandline -opc)) -eq 2' -a edge -d 'Forward files or standard input to an aggregator over TLS, authenticated'
|
||||
complete -c lw -n '__lw_in preset; and test (count (commandline -opc)) -eq 2' -a aggregator -d 'Receive from edges over TLS, authenticated, to files or standard output'
|
||||
complete -c lw -n '__lw_in preset pipe' -l format -r -F -d 'raw|txt|json'
|
||||
complete -c lw -n '__lw_in preset pipe' -l help -o h -d 'print the flags'
|
||||
complete -c lw -n '__lw_in preset tail' -l format -r -F -d 'raw|txt|json'
|
||||
complete -c lw -n '__lw_in preset tail' -l from -r -F -d 'start|end: where reading a file starts'
|
||||
complete -c lw -n '__lw_in preset tail' -l path -r -F -d 'file, directory (its files) or glob to follow'
|
||||
complete -c lw -n '__lw_in preset tail' -l help -o h -d 'print the flags'
|
||||
complete -c lw -n '__lw_in preset serve' -l allow -r -F -d 'addresses or CIDRs that may connect, of listen\'s family (either behind proxy=); default: all; \',\' between them'
|
||||
complete -c lw -n '__lw_in preset serve' -l cert -r -F -d 'certificate file, for tls=files'
|
||||
complete -c lw -n '__lw_in preset serve' -l deny -r -F -d 'addresses or CIDRs refused, allow or not; \',\' between them'
|
||||
complete -c lw -n '__lw_in preset serve' -l format -r -F -d 'raw|txt|json'
|
||||
complete -c lw -n '__lw_in preset serve' -l from -r -F -d 'start|end: where reading a file starts'
|
||||
complete -c lw -n '__lw_in preset serve' -l hosts -r -F -d 'names and addresses, beyond this host\'s, of a self or issuer certificate; \',\' between them'
|
||||
complete -c lw -n '__lw_in preset serve' -l issuer_cert -r -F -d 'CA certificate file (lw tls ca), for tls=issuer'
|
||||
complete -c lw -n '__lw_in preset serve' -l issuer_key -r -F -d 'CA key file, for tls=issuer'
|
||||
complete -c lw -n '__lw_in preset serve' -l key -r -F -d 'key file, for tls=files'
|
||||
complete -c lw -n '__lw_in preset serve' -l listen -r -F -d 'HOST:PORT; [IPV6]:PORT'
|
||||
complete -c lw -n '__lw_in preset serve' -l path -r -F -d 'file, directory (its files) or glob to follow; default: standard input'
|
||||
complete -c lw -n '__lw_in preset serve' -l proxy -r -F -d 'addresses or CIDRs of the TLS-terminating proxies browsers come through; \',\' between them'
|
||||
complete -c lw -n '__lw_in preset serve' -l tls -r -F -d 'off|self|issuer|files: a certificate made at startup (self-signed or from issuer_*), or files'
|
||||
complete -c lw -n '__lw_in preset serve' -l users -r -F -d 'credentials file (lw auth add-user): readers log in with SCRAM'
|
||||
complete -c lw -n '__lw_in preset serve' -l viewer -r -F -d 'true: the login page and viewer for users, behind proxy; without users the viewer is always on'
|
||||
complete -c lw -n '__lw_in preset serve' -l help -o h -d 'print the flags'
|
||||
complete -c lw -n '__lw_in preset edge' -l ca -r -F -d 'CA file that verifies the aggregator; default: system roots'
|
||||
complete -c lw -n '__lw_in preset edge' -l cert -r -F -d 'client certificate file, for an aggregator with client_ca'
|
||||
complete -c lw -n '__lw_in preset edge' -l from -r -F -d 'start|end: where reading a file starts'
|
||||
complete -c lw -n '__lw_in preset edge' -l key -r -F -d 'client key file'
|
||||
complete -c lw -n '__lw_in preset edge' -l node -r -F -d 'origin label; default: this host\'s name'
|
||||
complete -c lw -n '__lw_in preset edge' -l password_file -r -F -d 'file holding the SCRAM password'
|
||||
complete -c lw -n '__lw_in preset edge' -l path -r -F -d 'file, directory (its files) or glob to follow; default: standard input'
|
||||
complete -c lw -n '__lw_in preset edge' -l pin -r -F -d 'sha256//BASE64 of the aggregator\'s key, which it logs with tls=self'
|
||||
complete -c lw -n '__lw_in preset edge' -l server_name -r -F -d 'name the aggregator\'s certificate carries; default: to\'s host'
|
||||
complete -c lw -n '__lw_in preset edge' -l to -r -F -d 'the aggregator\'s HOST:PORT; [IPV6]:PORT'
|
||||
complete -c lw -n '__lw_in preset edge' -l transport -r -F -d 'tcp|http: tcp_chain or http_chain'
|
||||
complete -c lw -n '__lw_in preset edge' -l user -o u -r -F -d 'SCRAM user (lw auth add-user on the aggregator)'
|
||||
complete -c lw -n '__lw_in preset edge' -l help -o h -d 'print the flags'
|
||||
complete -c lw -n '__lw_in preset aggregator' -l allow -r -F -d 'addresses or CIDRs that may connect, of listen\'s family (either behind proxy=); default: all; \',\' between them'
|
||||
complete -c lw -n '__lw_in preset aggregator' -l cert -r -F -d 'certificate file, for tls=files'
|
||||
complete -c lw -n '__lw_in preset aggregator' -l client_ca -r -F -d 'CA file that verifies edge certificates (mTLS)'
|
||||
complete -c lw -n '__lw_in preset aggregator' -l deny -r -F -d 'addresses or CIDRs refused, allow or not; \',\' between them'
|
||||
complete -c lw -n '__lw_in preset aggregator' -l format -r -F -d 'raw|txt|json'
|
||||
complete -c lw -n '__lw_in preset aggregator' -l hosts -r -F -d 'names and addresses, beyond this host\'s, of a self or issuer certificate; \',\' between them'
|
||||
complete -c lw -n '__lw_in preset aggregator' -l issuer_cert -r -F -d 'CA certificate file (lw tls ca), for tls=issuer'
|
||||
complete -c lw -n '__lw_in preset aggregator' -l issuer_key -r -F -d 'CA key file, for tls=issuer'
|
||||
complete -c lw -n '__lw_in preset aggregator' -l key -r -F -d 'key file, for tls=files'
|
||||
complete -c lw -n '__lw_in preset aggregator' -l listen -r -F -d 'HOST:PORT; [IPV6]:PORT; [::] for IPv6 only'
|
||||
complete -c lw -n '__lw_in preset aggregator' -l out -r -F -d 'directory for the received entries; default: standard output'
|
||||
complete -c lw -n '__lw_in preset aggregator' -l tls -r -F -d 'self|issuer|files: a certificate made at startup (self-signed or from issuer_*), or files'
|
||||
complete -c lw -n '__lw_in preset aggregator' -l transport -r -F -d 'tcp|http: tcp_chain or http_chain'
|
||||
complete -c lw -n '__lw_in preset aggregator' -l users -r -F -d 'credentials file (lw auth add-user): edges log in with SCRAM'
|
||||
complete -c lw -n '__lw_in preset aggregator' -l help -o h -d 'print the flags'
|
||||
@@ -0,0 +1,4 @@
|
||||
Section: admin
|
||||
Priority: optional
|
||||
Homepage: https://github.com/lixenwraith/logwisp
|
||||
Description: Pipeline-based log transport with TLS and SCRAM authentication
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
# sysusers and tmpfiles need no running systemd (a chroot); a first install
|
||||
# leaves the service to systemctl enable --now logwisp, an upgrade restarts it
|
||||
# if it runs. As in debhelper's scripts, only the account is fatal.
|
||||
set -e
|
||||
if [ "$1" = configure ]; then
|
||||
if command -v systemd-sysusers >/dev/null; then systemd-sysusers logwisp.conf; fi
|
||||
if command -v systemd-tmpfiles >/dev/null; then systemd-tmpfiles --create logwisp.conf || true; fi
|
||||
if [ -d /run/systemd/system ]; then
|
||||
systemctl daemon-reload || true
|
||||
if [ -n "$2" ]; then systemctl try-restart logwisp.service || true; fi
|
||||
fi
|
||||
fi
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
# A purge removes logwisp.toml; credentials in /etc/logwisp, /var/lib/logwisp,
|
||||
# /var/log/logwisp and the logwisp user stay, as make uninstall keeps them.
|
||||
set -e
|
||||
if [ -d /run/systemd/system ]; then systemctl daemon-reload || true; fi
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
if [ "$1" = remove ]; then
|
||||
if [ -d /run/systemd/system ]; then systemctl stop logwisp.service || true; fi
|
||||
systemctl disable logwisp.service >/dev/null 2>&1 || true
|
||||
fi
|
||||
@@ -33,6 +33,15 @@ PORTDOCS= *
|
||||
|
||||
post-install:
|
||||
${INSTALL_MAN} ${WRKSRC}/doc/lw.1 ${STAGEDIR}${PREFIX}/share/man/man1
|
||||
${MKDIR} ${STAGEDIR}${PREFIX}/share/bash-completion/completions \
|
||||
${STAGEDIR}${PREFIX}/share/fish/vendor_completions.d \
|
||||
${STAGEDIR}${PREFIX}/share/zsh/site-functions
|
||||
${INSTALL_DATA} ${WRKSRC}/deploy/package/completion/lw.bash \
|
||||
${STAGEDIR}${PREFIX}/share/bash-completion/completions/lw
|
||||
${INSTALL_DATA} ${WRKSRC}/deploy/package/completion/lw.fish \
|
||||
${STAGEDIR}${PREFIX}/share/fish/vendor_completions.d
|
||||
${INSTALL_DATA} ${WRKSRC}/deploy/package/completion/_lw \
|
||||
${STAGEDIR}${PREFIX}/share/zsh/site-functions
|
||||
${MKDIR} ${STAGEDIR}${ETCDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/config/logwisp.toml ${STAGEDIR}${ETCDIR}/logwisp.toml.sample
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
bin/lw
|
||||
@sample %%ETCDIR%%/logwisp.toml.sample
|
||||
share/bash-completion/completions/lw
|
||||
share/fish/vendor_completions.d/lw.fish
|
||||
share/man/man1/lw.1.gz
|
||||
share/zsh/site-functions/_lw
|
||||
Reference in new issue
Block a user