From a4410a22de076859871101a728885727c9ba123c Mon Sep 17 00:00:00 2001 From: Micha Glave Date: Fri, 2 Jan 2026 11:20:00 +0100 Subject: [PATCH] shell completition added net-nds/kanidmd --- net-nds/kanidmd/files/kanidmd.bash | 2062 +++++++++++++++++++++++ net-nds/kanidmd/files/kanidmd.fish | 214 +++ net-nds/kanidmd/files/kanidmd.zsh | 1261 ++++++++++++++ net-nds/kanidmd/kanidmd-1.8.5-r1.ebuild | 27 +- 4 files changed, 3552 insertions(+), 12 deletions(-) create mode 100644 net-nds/kanidmd/files/kanidmd.bash create mode 100644 net-nds/kanidmd/files/kanidmd.fish create mode 100644 net-nds/kanidmd/files/kanidmd.zsh diff --git a/net-nds/kanidmd/files/kanidmd.bash b/net-nds/kanidmd/files/kanidmd.bash new file mode 100644 index 0000000..f416b12 --- /dev/null +++ b/net-nds/kanidmd/files/kanidmd.bash @@ -0,0 +1,2062 @@ +_kanidmd() { + local i cur prev opts cmd + COMPREPLY=() + if [[ "${BASH_VERSINFO[0]}" -ge 4 ]]; then + cur="$2" + else + cur="${COMP_WORDS[COMP_CWORD]}" + fi + prev="$3" + cmd="" + opts="" + + for i in "${COMP_WORDS[@]:0:COMP_CWORD}" + do + case "${cmd},${i}" in + ",$1") + cmd="kanidmd" + ;; + kanidmd,cert-generate) + cmd="kanidmd__cert__generate" + ;; + kanidmd,configtest) + cmd="kanidmd__configtest" + ;; + kanidmd,database) + cmd="kanidmd__database" + ;; + kanidmd,db-scan) + cmd="kanidmd__db__scan" + ;; + kanidmd,disable-account) + cmd="kanidmd__disable__account" + ;; + kanidmd,domain) + cmd="kanidmd__domain" + ;; + kanidmd,healthcheck) + cmd="kanidmd__healthcheck" + ;; + kanidmd,help) + cmd="kanidmd__help" + ;; + kanidmd,recover-account) + cmd="kanidmd__recover__account" + ;; + kanidmd,refresh-replication-consumer) + cmd="kanidmd__refresh__replication__consumer" + ;; + kanidmd,renew-replication-certificate) + cmd="kanidmd__renew__replication__certificate" + ;; + kanidmd,server) + cmd="kanidmd__server" + ;; + kanidmd,show-replication-certificate) + cmd="kanidmd__show__replication__certificate" + ;; + kanidmd,version) + cmd="kanidmd__version" + ;; + kanidmd__database,backup) + cmd="kanidmd__database__backup" + ;; + kanidmd__database,help) + cmd="kanidmd__database__help" + ;; + kanidmd__database,reindex) + cmd="kanidmd__database__reindex" + ;; + kanidmd__database,restore) + cmd="kanidmd__database__restore" + ;; + kanidmd__database,vacuum) + cmd="kanidmd__database__vacuum" + ;; + kanidmd__database,verify) + cmd="kanidmd__database__verify" + ;; + kanidmd__database__help,backup) + cmd="kanidmd__database__help__backup" + ;; + kanidmd__database__help,help) + cmd="kanidmd__database__help__help" + ;; + kanidmd__database__help,reindex) + cmd="kanidmd__database__help__reindex" + ;; + kanidmd__database__help,restore) + cmd="kanidmd__database__help__restore" + ;; + kanidmd__database__help,vacuum) + cmd="kanidmd__database__help__vacuum" + ;; + kanidmd__database__help,verify) + cmd="kanidmd__database__help__verify" + ;; + kanidmd__db__scan,get-id2entry) + cmd="kanidmd__db__scan__get__id2entry" + ;; + kanidmd__db__scan,help) + cmd="kanidmd__db__scan__help" + ;; + kanidmd__db__scan,list-all-indexes) + cmd="kanidmd__db__scan__list__all__indexes" + ;; + kanidmd__db__scan,list-id2entry) + cmd="kanidmd__db__scan__list__id2entry" + ;; + kanidmd__db__scan,list-index) + cmd="kanidmd__db__scan__list__index" + ;; + kanidmd__db__scan,list-index-analysis) + cmd="kanidmd__db__scan__list__index__analysis" + ;; + kanidmd__db__scan,list-quarantined) + cmd="kanidmd__db__scan__list__quarantined" + ;; + kanidmd__db__scan,quarantine-id2entry) + cmd="kanidmd__db__scan__quarantine__id2entry" + ;; + kanidmd__db__scan,restore-quarantined) + cmd="kanidmd__db__scan__restore__quarantined" + ;; + kanidmd__db__scan__help,get-id2entry) + cmd="kanidmd__db__scan__help__get__id2entry" + ;; + kanidmd__db__scan__help,help) + cmd="kanidmd__db__scan__help__help" + ;; + kanidmd__db__scan__help,list-all-indexes) + cmd="kanidmd__db__scan__help__list__all__indexes" + ;; + kanidmd__db__scan__help,list-id2entry) + cmd="kanidmd__db__scan__help__list__id2entry" + ;; + kanidmd__db__scan__help,list-index) + cmd="kanidmd__db__scan__help__list__index" + ;; + kanidmd__db__scan__help,list-index-analysis) + cmd="kanidmd__db__scan__help__list__index__analysis" + ;; + kanidmd__db__scan__help,list-quarantined) + cmd="kanidmd__db__scan__help__list__quarantined" + ;; + kanidmd__db__scan__help,quarantine-id2entry) + cmd="kanidmd__db__scan__help__quarantine__id2entry" + ;; + kanidmd__db__scan__help,restore-quarantined) + cmd="kanidmd__db__scan__help__restore__quarantined" + ;; + kanidmd__domain,help) + cmd="kanidmd__domain__help" + ;; + kanidmd__domain,raise) + cmd="kanidmd__domain__raise" + ;; + kanidmd__domain,remigrate) + cmd="kanidmd__domain__remigrate" + ;; + kanidmd__domain,rename) + cmd="kanidmd__domain__rename" + ;; + kanidmd__domain,show) + cmd="kanidmd__domain__show" + ;; + kanidmd__domain,upgrade-check) + cmd="kanidmd__domain__upgrade__check" + ;; + kanidmd__domain__help,help) + cmd="kanidmd__domain__help__help" + ;; + kanidmd__domain__help,raise) + cmd="kanidmd__domain__help__raise" + ;; + kanidmd__domain__help,remigrate) + cmd="kanidmd__domain__help__remigrate" + ;; + kanidmd__domain__help,rename) + cmd="kanidmd__domain__help__rename" + ;; + kanidmd__domain__help,show) + cmd="kanidmd__domain__help__show" + ;; + kanidmd__domain__help,upgrade-check) + cmd="kanidmd__domain__help__upgrade__check" + ;; + kanidmd__help,cert-generate) + cmd="kanidmd__help__cert__generate" + ;; + kanidmd__help,configtest) + cmd="kanidmd__help__configtest" + ;; + kanidmd__help,database) + cmd="kanidmd__help__database" + ;; + kanidmd__help,db-scan) + cmd="kanidmd__help__db__scan" + ;; + kanidmd__help,disable-account) + cmd="kanidmd__help__disable__account" + ;; + kanidmd__help,domain) + cmd="kanidmd__help__domain" + ;; + kanidmd__help,healthcheck) + cmd="kanidmd__help__healthcheck" + ;; + kanidmd__help,help) + cmd="kanidmd__help__help" + ;; + kanidmd__help,recover-account) + cmd="kanidmd__help__recover__account" + ;; + kanidmd__help,refresh-replication-consumer) + cmd="kanidmd__help__refresh__replication__consumer" + ;; + kanidmd__help,renew-replication-certificate) + cmd="kanidmd__help__renew__replication__certificate" + ;; + kanidmd__help,server) + cmd="kanidmd__help__server" + ;; + kanidmd__help,show-replication-certificate) + cmd="kanidmd__help__show__replication__certificate" + ;; + kanidmd__help,version) + cmd="kanidmd__help__version" + ;; + kanidmd__help__database,backup) + cmd="kanidmd__help__database__backup" + ;; + kanidmd__help__database,reindex) + cmd="kanidmd__help__database__reindex" + ;; + kanidmd__help__database,restore) + cmd="kanidmd__help__database__restore" + ;; + kanidmd__help__database,vacuum) + cmd="kanidmd__help__database__vacuum" + ;; + kanidmd__help__database,verify) + cmd="kanidmd__help__database__verify" + ;; + kanidmd__help__db__scan,get-id2entry) + cmd="kanidmd__help__db__scan__get__id2entry" + ;; + kanidmd__help__db__scan,list-all-indexes) + cmd="kanidmd__help__db__scan__list__all__indexes" + ;; + kanidmd__help__db__scan,list-id2entry) + cmd="kanidmd__help__db__scan__list__id2entry" + ;; + kanidmd__help__db__scan,list-index) + cmd="kanidmd__help__db__scan__list__index" + ;; + kanidmd__help__db__scan,list-index-analysis) + cmd="kanidmd__help__db__scan__list__index__analysis" + ;; + kanidmd__help__db__scan,list-quarantined) + cmd="kanidmd__help__db__scan__list__quarantined" + ;; + kanidmd__help__db__scan,quarantine-id2entry) + cmd="kanidmd__help__db__scan__quarantine__id2entry" + ;; + kanidmd__help__db__scan,restore-quarantined) + cmd="kanidmd__help__db__scan__restore__quarantined" + ;; + kanidmd__help__domain,raise) + cmd="kanidmd__help__domain__raise" + ;; + kanidmd__help__domain,remigrate) + cmd="kanidmd__help__domain__remigrate" + ;; + kanidmd__help__domain,rename) + cmd="kanidmd__help__domain__rename" + ;; + kanidmd__help__domain,show) + cmd="kanidmd__help__domain__show" + ;; + kanidmd__help__domain,upgrade-check) + cmd="kanidmd__help__domain__upgrade__check" + ;; + *) + ;; + esac + done + + case "${cmd}" in + kanidmd) + opts="-c -o -h --config-path --output --help server configtest cert-generate recover-account disable-account show-replication-certificate renew-replication-certificate refresh-replication-consumer db-scan database domain healthcheck version help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config-path) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --output) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -o) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__cert__generate) + opts="-c -o -h --config-path --output --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config-path) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --output) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -o) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__configtest) + opts="-c -o -h --config-path --output --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config-path) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --output) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -o) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__database) + opts="-c -o -h --config-path --output --help vacuum backup restore verify reindex help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config-path) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --output) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -o) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__database__backup) + opts="-C -c -o -h --compression --config-path --output --help " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --compression) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -C) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --config-path) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --output) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -o) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__database__help) + opts="vacuum backup restore verify reindex help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__database__help__backup) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__database__help__help) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__database__help__reindex) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__database__help__restore) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__database__help__vacuum) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__database__help__verify) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__database__reindex) + opts="-c -o -h --config-path --output --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config-path) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --output) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -o) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__database__restore) + opts="-c -o -h --config-path --output --help " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config-path) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --output) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -o) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__database__vacuum) + opts="-c -o -h --config-path --output --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config-path) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --output) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -o) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__database__verify) + opts="-c -o -h --config-path --output --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config-path) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --output) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -o) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__db__scan) + opts="-c -o -h --config-path --output --help list-all-indexes list-index list-id2entry get-id2entry list-index-analysis quarantine-id2entry list-quarantined restore-quarantined help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config-path) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --output) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -o) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__db__scan__get__id2entry) + opts="-c -o -h --config-path --output --help " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config-path) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --output) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -o) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__db__scan__help) + opts="list-all-indexes list-index list-id2entry get-id2entry list-index-analysis quarantine-id2entry list-quarantined restore-quarantined help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__db__scan__help__get__id2entry) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__db__scan__help__help) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__db__scan__help__list__all__indexes) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__db__scan__help__list__id2entry) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__db__scan__help__list__index) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__db__scan__help__list__index__analysis) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__db__scan__help__list__quarantined) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__db__scan__help__quarantine__id2entry) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__db__scan__help__restore__quarantined) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__db__scan__list__all__indexes) + opts="-c -o -h --config-path --output --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config-path) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --output) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -o) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__db__scan__list__id2entry) + opts="-c -o -h --config-path --output --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config-path) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --output) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -o) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__db__scan__list__index) + opts="-c -o -h --config-path --output --help " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config-path) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --output) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -o) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__db__scan__list__index__analysis) + opts="-c -o -h --config-path --output --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config-path) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --output) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -o) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__db__scan__list__quarantined) + opts="-c -o -h --config-path --output --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config-path) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --output) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -o) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__db__scan__quarantine__id2entry) + opts="-c -o -h --config-path --output --help " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config-path) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --output) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -o) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__db__scan__restore__quarantined) + opts="-c -o -h --config-path --output --help " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config-path) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --output) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -o) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__disable__account) + opts="-c -o -h --config-path --output --help " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config-path) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --output) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -o) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__domain) + opts="-c -o -h --config-path --output --help show rename upgrade-check raise remigrate help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config-path) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --output) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -o) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__domain__help) + opts="show rename upgrade-check raise remigrate help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__domain__help__help) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__domain__help__raise) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__domain__help__remigrate) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__domain__help__rename) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__domain__help__show) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__domain__help__upgrade__check) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__domain__raise) + opts="-c -o -h --config-path --output --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config-path) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --output) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -o) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__domain__remigrate) + opts="-c -o -h --config-path --output --help [LEVEL]" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config-path) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --output) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -o) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__domain__rename) + opts="-c -o -h --config-path --output --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config-path) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --output) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -o) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__domain__show) + opts="-c -o -h --config-path --output --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config-path) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --output) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -o) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__domain__upgrade__check) + opts="-c -o -h --config-path --output --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config-path) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --output) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -o) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__healthcheck) + opts="-v -O -c -o -h --verify-tls --check-origin --config-path --output --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config-path) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --output) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -o) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__help) + opts="server configtest cert-generate recover-account disable-account show-replication-certificate renew-replication-certificate refresh-replication-consumer db-scan database domain healthcheck version help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__help__cert__generate) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__help__configtest) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__help__database) + opts="vacuum backup restore verify reindex" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__help__database__backup) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__help__database__reindex) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__help__database__restore) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__help__database__vacuum) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__help__database__verify) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__help__db__scan) + opts="list-all-indexes list-index list-id2entry get-id2entry list-index-analysis quarantine-id2entry list-quarantined restore-quarantined" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__help__db__scan__get__id2entry) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__help__db__scan__list__all__indexes) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__help__db__scan__list__id2entry) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__help__db__scan__list__index) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__help__db__scan__list__index__analysis) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__help__db__scan__list__quarantined) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__help__db__scan__quarantine__id2entry) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__help__db__scan__restore__quarantined) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__help__disable__account) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__help__domain) + opts="show rename upgrade-check raise remigrate" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__help__domain__raise) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__help__domain__remigrate) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__help__domain__rename) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__help__domain__show) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__help__domain__upgrade__check) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__help__healthcheck) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__help__help) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__help__recover__account) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__help__refresh__replication__consumer) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__help__renew__replication__certificate) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__help__server) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__help__show__replication__certificate) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__help__version) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__recover__account) + opts="-c -o -h --config-path --output --help " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config-path) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --output) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -o) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__refresh__replication__consumer) + opts="-c -o -h --i-want-to-refresh-this-servers-database --config-path --output --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config-path) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --output) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -o) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__renew__replication__certificate) + opts="-c -o -h --config-path --output --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config-path) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --output) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -o) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__server) + opts="-c -o -h --config-path --output --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config-path) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --output) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -o) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__show__replication__certificate) + opts="-c -o -h --config-path --output --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config-path) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --output) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -o) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + kanidmd__version) + opts="-c -o -h --config-path --output --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --config-path) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --output) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -o) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + esac +} + +if [[ "${BASH_VERSINFO[0]}" -eq 4 && "${BASH_VERSINFO[1]}" -ge 4 || "${BASH_VERSINFO[0]}" -gt 4 ]]; then + complete -F _kanidmd -o nosort -o bashdefault -o default kanidmd +else + complete -F _kanidmd -o bashdefault -o default kanidmd +fi diff --git a/net-nds/kanidmd/files/kanidmd.fish b/net-nds/kanidmd/files/kanidmd.fish new file mode 100644 index 0000000..76ac5d3 --- /dev/null +++ b/net-nds/kanidmd/files/kanidmd.fish @@ -0,0 +1,214 @@ +# Print an optspec for argparse to handle cmd's options that are independent of any subcommand. +function __fish_kanidmd_global_optspecs + string join \n c/config-path= o/output= h/help +end + +function __fish_kanidmd_needs_command + # Figure out if the current invocation already has a command. + set -l cmd (commandline -opc) + set -e cmd[1] + argparse -s (__fish_kanidmd_global_optspecs) -- $cmd 2>/dev/null + or return + if set -q argv[1] + # Also print the command, so this can be used to figure out what it is. + echo $argv[1] + return 1 + end + return 0 +end + +function __fish_kanidmd_using_subcommand + set -l cmd (__fish_kanidmd_needs_command) + test -z "$cmd" + and return 1 + contains -- $cmd[1] $argv +end + +complete -c kanidmd -n "__fish_kanidmd_needs_command" -s c -l config-path -r -F +complete -c kanidmd -n "__fish_kanidmd_needs_command" -s o -l output -d 'Output formatting' -r +complete -c kanidmd -n "__fish_kanidmd_needs_command" -s h -l help -d 'Print help' +complete -c kanidmd -n "__fish_kanidmd_needs_command" -f -a "server" -d 'Start the IDM Server' +complete -c kanidmd -n "__fish_kanidmd_needs_command" -f -a "configtest" -d 'Test the IDM Server configuration, without starting network listeners' +complete -c kanidmd -n "__fish_kanidmd_needs_command" -f -a "cert-generate" -d 'Create a self-signed ca and tls certificate in the locations listed from the configuration. These certificates should *not* be used in production, they are for testing and evaluation only!' +complete -c kanidmd -n "__fish_kanidmd_needs_command" -f -a "recover-account" -d 'Recover an account\'s password' +complete -c kanidmd -n "__fish_kanidmd_needs_command" -f -a "disable-account" -d 'Disable an account so that it can not be used. This can be reset with `recover-account`' +complete -c kanidmd -n "__fish_kanidmd_needs_command" -f -a "show-replication-certificate" -d 'Display this server\'s replication certificate' +complete -c kanidmd -n "__fish_kanidmd_needs_command" -f -a "renew-replication-certificate" -d 'Renew this server\'s replication certificate' +complete -c kanidmd -n "__fish_kanidmd_needs_command" -f -a "refresh-replication-consumer" -d 'Refresh this servers database content with the content from a supplier. This means that all local content will be deleted and replaced with the supplier content' +complete -c kanidmd -n "__fish_kanidmd_needs_command" -f -a "db-scan" -d 'Inspect the internal content of the database datastructures' +complete -c kanidmd -n "__fish_kanidmd_needs_command" -f -a "database" -d 'Database maintenance, backups, restoration etc' +complete -c kanidmd -n "__fish_kanidmd_needs_command" -f -a "domain" -d 'Change domain settings' +complete -c kanidmd -n "__fish_kanidmd_needs_command" -f -a "healthcheck" -d 'Load the server config and check services are listening' +complete -c kanidmd -n "__fish_kanidmd_needs_command" -f -a "version" -d 'Print the program version and exit' +complete -c kanidmd -n "__fish_kanidmd_needs_command" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand server" -s c -l config-path -r -F +complete -c kanidmd -n "__fish_kanidmd_using_subcommand server" -s o -l output -d 'Output formatting' -r +complete -c kanidmd -n "__fish_kanidmd_using_subcommand server" -s h -l help -d 'Print help' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand configtest" -s c -l config-path -r -F +complete -c kanidmd -n "__fish_kanidmd_using_subcommand configtest" -s o -l output -d 'Output formatting' -r +complete -c kanidmd -n "__fish_kanidmd_using_subcommand configtest" -s h -l help -d 'Print help' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand cert-generate" -s c -l config-path -r -F +complete -c kanidmd -n "__fish_kanidmd_using_subcommand cert-generate" -s o -l output -d 'Output formatting' -r +complete -c kanidmd -n "__fish_kanidmd_using_subcommand cert-generate" -s h -l help -d 'Print help' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand recover-account" -s c -l config-path -r -F +complete -c kanidmd -n "__fish_kanidmd_using_subcommand recover-account" -s o -l output -d 'Output formatting' -r +complete -c kanidmd -n "__fish_kanidmd_using_subcommand recover-account" -s h -l help -d 'Print help' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand disable-account" -s c -l config-path -r -F +complete -c kanidmd -n "__fish_kanidmd_using_subcommand disable-account" -s o -l output -d 'Output formatting' -r +complete -c kanidmd -n "__fish_kanidmd_using_subcommand disable-account" -s h -l help -d 'Print help' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand show-replication-certificate" -s c -l config-path -r -F +complete -c kanidmd -n "__fish_kanidmd_using_subcommand show-replication-certificate" -s o -l output -d 'Output formatting' -r +complete -c kanidmd -n "__fish_kanidmd_using_subcommand show-replication-certificate" -s h -l help -d 'Print help' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand renew-replication-certificate" -s c -l config-path -r -F +complete -c kanidmd -n "__fish_kanidmd_using_subcommand renew-replication-certificate" -s o -l output -d 'Output formatting' -r +complete -c kanidmd -n "__fish_kanidmd_using_subcommand renew-replication-certificate" -s h -l help -d 'Print help' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand refresh-replication-consumer" -s c -l config-path -r -F +complete -c kanidmd -n "__fish_kanidmd_using_subcommand refresh-replication-consumer" -s o -l output -d 'Output formatting' -r +complete -c kanidmd -n "__fish_kanidmd_using_subcommand refresh-replication-consumer" -l i-want-to-refresh-this-servers-database -d 'Acknowledge that this database content will be refreshed from a supplier' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand refresh-replication-consumer" -s h -l help -d 'Print help' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and not __fish_seen_subcommand_from list-all-indexes list-index list-id2entry get-id2entry list-index-analysis quarantine-id2entry list-quarantined restore-quarantined help" -s c -l config-path -r -F +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and not __fish_seen_subcommand_from list-all-indexes list-index list-id2entry get-id2entry list-index-analysis quarantine-id2entry list-quarantined restore-quarantined help" -s o -l output -d 'Output formatting' -r +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and not __fish_seen_subcommand_from list-all-indexes list-index list-id2entry get-id2entry list-index-analysis quarantine-id2entry list-quarantined restore-quarantined help" -s h -l help -d 'Print help' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and not __fish_seen_subcommand_from list-all-indexes list-index list-id2entry get-id2entry list-index-analysis quarantine-id2entry list-quarantined restore-quarantined help" -f -a "list-all-indexes" -d 'List all index tables that exist on the system' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and not __fish_seen_subcommand_from list-all-indexes list-index list-id2entry get-id2entry list-index-analysis quarantine-id2entry list-quarantined restore-quarantined help" -f -a "list-index" -d 'List all content of a named index' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and not __fish_seen_subcommand_from list-all-indexes list-index list-id2entry get-id2entry list-index-analysis quarantine-id2entry list-quarantined restore-quarantined help" -f -a "list-id2entry" -d 'List all id2entry values with reduced entry content' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and not __fish_seen_subcommand_from list-all-indexes list-index list-id2entry get-id2entry list-index-analysis quarantine-id2entry list-quarantined restore-quarantined help" -f -a "get-id2entry" -d 'View the data of a specific entry from id2entry' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and not __fish_seen_subcommand_from list-all-indexes list-index list-id2entry get-id2entry list-index-analysis quarantine-id2entry list-quarantined restore-quarantined help" -f -a "list-index-analysis" -d 'List all content of index analysis' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and not __fish_seen_subcommand_from list-all-indexes list-index list-id2entry get-id2entry list-index-analysis quarantine-id2entry list-quarantined restore-quarantined help" -f -a "quarantine-id2entry" -d 'Given an entry id, quarantine the entry in a hidden db partition' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and not __fish_seen_subcommand_from list-all-indexes list-index list-id2entry get-id2entry list-index-analysis quarantine-id2entry list-quarantined restore-quarantined help" -f -a "list-quarantined" -d 'List the entries in quarantine' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and not __fish_seen_subcommand_from list-all-indexes list-index list-id2entry get-id2entry list-index-analysis quarantine-id2entry list-quarantined restore-quarantined help" -f -a "restore-quarantined" -d 'Given an entry id, restore the entry from the hidden db partition' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and not __fish_seen_subcommand_from list-all-indexes list-index list-id2entry get-id2entry list-index-analysis quarantine-id2entry list-quarantined restore-quarantined help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from list-all-indexes" -s c -l config-path -r -F +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from list-all-indexes" -s o -l output -d 'Output formatting' -r +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from list-all-indexes" -s h -l help -d 'Print help' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from list-index" -s c -l config-path -r -F +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from list-index" -s o -l output -d 'Output formatting' -r +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from list-index" -s h -l help -d 'Print help' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from list-id2entry" -s c -l config-path -r -F +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from list-id2entry" -s o -l output -d 'Output formatting' -r +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from list-id2entry" -s h -l help -d 'Print help' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from get-id2entry" -s c -l config-path -r -F +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from get-id2entry" -s o -l output -d 'Output formatting' -r +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from get-id2entry" -s h -l help -d 'Print help' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from list-index-analysis" -s c -l config-path -r -F +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from list-index-analysis" -s o -l output -d 'Output formatting' -r +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from list-index-analysis" -s h -l help -d 'Print help' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from quarantine-id2entry" -s c -l config-path -r -F +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from quarantine-id2entry" -s o -l output -d 'Output formatting' -r +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from quarantine-id2entry" -s h -l help -d 'Print help' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from list-quarantined" -s c -l config-path -r -F +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from list-quarantined" -s o -l output -d 'Output formatting' -r +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from list-quarantined" -s h -l help -d 'Print help' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from restore-quarantined" -s c -l config-path -r -F +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from restore-quarantined" -s o -l output -d 'Output formatting' -r +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from restore-quarantined" -s h -l help -d 'Print help' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from help" -f -a "list-all-indexes" -d 'List all index tables that exist on the system' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from help" -f -a "list-index" -d 'List all content of a named index' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from help" -f -a "list-id2entry" -d 'List all id2entry values with reduced entry content' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from help" -f -a "get-id2entry" -d 'View the data of a specific entry from id2entry' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from help" -f -a "list-index-analysis" -d 'List all content of index analysis' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from help" -f -a "quarantine-id2entry" -d 'Given an entry id, quarantine the entry in a hidden db partition' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from help" -f -a "list-quarantined" -d 'List the entries in quarantine' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from help" -f -a "restore-quarantined" -d 'Given an entry id, restore the entry from the hidden db partition' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand db-scan; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and not __fish_seen_subcommand_from vacuum backup restore verify reindex help" -s c -l config-path -r -F +complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and not __fish_seen_subcommand_from vacuum backup restore verify reindex help" -s o -l output -d 'Output formatting' -r +complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and not __fish_seen_subcommand_from vacuum backup restore verify reindex help" -s h -l help -d 'Print help' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and not __fish_seen_subcommand_from vacuum backup restore verify reindex help" -f -a "vacuum" -d 'Vacuum the database to reclaim space or change db_fs_type/page_size (offline)' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and not __fish_seen_subcommand_from vacuum backup restore verify reindex help" -f -a "backup" -d 'Backup the database content (offline)' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and not __fish_seen_subcommand_from vacuum backup restore verify reindex help" -f -a "restore" -d 'Restore the database content (offline)' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and not __fish_seen_subcommand_from vacuum backup restore verify reindex help" -f -a "verify" -d 'Verify database and entity consistency' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and not __fish_seen_subcommand_from vacuum backup restore verify reindex help" -f -a "reindex" -d 'Reindex the database (offline)' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and not __fish_seen_subcommand_from vacuum backup restore verify reindex help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and __fish_seen_subcommand_from vacuum" -s c -l config-path -r -F +complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and __fish_seen_subcommand_from vacuum" -s o -l output -d 'Output formatting' -r +complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and __fish_seen_subcommand_from vacuum" -s h -l help -d 'Print help' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and __fish_seen_subcommand_from backup" -s C -l compression -d 'Compression method' -r +complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and __fish_seen_subcommand_from backup" -s c -l config-path -r -F +complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and __fish_seen_subcommand_from backup" -s o -l output -d 'Output formatting' -r +complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and __fish_seen_subcommand_from backup" -s h -l help -d 'Print help' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and __fish_seen_subcommand_from restore" -s c -l config-path -r -F +complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and __fish_seen_subcommand_from restore" -s o -l output -d 'Output formatting' -r +complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and __fish_seen_subcommand_from restore" -s h -l help -d 'Print help' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and __fish_seen_subcommand_from verify" -s c -l config-path -r -F +complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and __fish_seen_subcommand_from verify" -s o -l output -d 'Output formatting' -r +complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and __fish_seen_subcommand_from verify" -s h -l help -d 'Print help' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and __fish_seen_subcommand_from reindex" -s c -l config-path -r -F +complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and __fish_seen_subcommand_from reindex" -s o -l output -d 'Output formatting' -r +complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and __fish_seen_subcommand_from reindex" -s h -l help -d 'Print help' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and __fish_seen_subcommand_from help" -f -a "vacuum" -d 'Vacuum the database to reclaim space or change db_fs_type/page_size (offline)' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and __fish_seen_subcommand_from help" -f -a "backup" -d 'Backup the database content (offline)' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and __fish_seen_subcommand_from help" -f -a "restore" -d 'Restore the database content (offline)' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and __fish_seen_subcommand_from help" -f -a "verify" -d 'Verify database and entity consistency' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and __fish_seen_subcommand_from help" -f -a "reindex" -d 'Reindex the database (offline)' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand database; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and not __fish_seen_subcommand_from show rename upgrade-check raise remigrate help" -s c -l config-path -r -F +complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and not __fish_seen_subcommand_from show rename upgrade-check raise remigrate help" -s o -l output -d 'Output formatting' -r +complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and not __fish_seen_subcommand_from show rename upgrade-check raise remigrate help" -s h -l help -d 'Print help' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and not __fish_seen_subcommand_from show rename upgrade-check raise remigrate help" -f -a "show" -d 'Show the current domain' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and not __fish_seen_subcommand_from show rename upgrade-check raise remigrate help" -f -a "rename" -d 'Change the IDM domain name based on the values in the configuration' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and not __fish_seen_subcommand_from show rename upgrade-check raise remigrate help" -f -a "upgrade-check" -d 'Perform a pre-upgrade-check of this domains content. This will report possible incompatibilities that can block a successful upgrade to the next version of Kanidm. This is a safe read only operation' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and not __fish_seen_subcommand_from show rename upgrade-check raise remigrate help" -f -a "raise" -d '⚠️ Do not use this command unless directed by a project member. ⚠️ - Raise the functional level of this domain to the maximum available' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and not __fish_seen_subcommand_from show rename upgrade-check raise remigrate help" -f -a "remigrate" -d '⚠️ Do not use this command unless directed by a project member. ⚠️ - Rerun migrations of this domains database, optionally nominating the level to start from' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and not __fish_seen_subcommand_from show rename upgrade-check raise remigrate help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and __fish_seen_subcommand_from show" -s c -l config-path -r -F +complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and __fish_seen_subcommand_from show" -s o -l output -d 'Output formatting' -r +complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and __fish_seen_subcommand_from show" -s h -l help -d 'Print help' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and __fish_seen_subcommand_from rename" -s c -l config-path -r -F +complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and __fish_seen_subcommand_from rename" -s o -l output -d 'Output formatting' -r +complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and __fish_seen_subcommand_from rename" -s h -l help -d 'Print help' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and __fish_seen_subcommand_from upgrade-check" -s c -l config-path -r -F +complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and __fish_seen_subcommand_from upgrade-check" -s o -l output -d 'Output formatting' -r +complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and __fish_seen_subcommand_from upgrade-check" -s h -l help -d 'Print help' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and __fish_seen_subcommand_from raise" -s c -l config-path -r -F +complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and __fish_seen_subcommand_from raise" -s o -l output -d 'Output formatting' -r +complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and __fish_seen_subcommand_from raise" -s h -l help -d 'Print help' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and __fish_seen_subcommand_from remigrate" -s c -l config-path -r -F +complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and __fish_seen_subcommand_from remigrate" -s o -l output -d 'Output formatting' -r +complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and __fish_seen_subcommand_from remigrate" -s h -l help -d 'Print help' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and __fish_seen_subcommand_from help" -f -a "show" -d 'Show the current domain' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and __fish_seen_subcommand_from help" -f -a "rename" -d 'Change the IDM domain name based on the values in the configuration' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and __fish_seen_subcommand_from help" -f -a "upgrade-check" -d 'Perform a pre-upgrade-check of this domains content. This will report possible incompatibilities that can block a successful upgrade to the next version of Kanidm. This is a safe read only operation' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and __fish_seen_subcommand_from help" -f -a "raise" -d '⚠️ Do not use this command unless directed by a project member. ⚠️ - Raise the functional level of this domain to the maximum available' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and __fish_seen_subcommand_from help" -f -a "remigrate" -d '⚠️ Do not use this command unless directed by a project member. ⚠️ - Rerun migrations of this domains database, optionally nominating the level to start from' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand domain; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand healthcheck" -s c -l config-path -r -F +complete -c kanidmd -n "__fish_kanidmd_using_subcommand healthcheck" -s o -l output -d 'Output formatting' -r +complete -c kanidmd -n "__fish_kanidmd_using_subcommand healthcheck" -s v -l verify-tls -d 'Disable TLS verification' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand healthcheck" -s O -l check-origin -d 'Check the \'origin\' URL from the server configuration file, instead of the \'address\'' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand healthcheck" -s h -l help -d 'Print help' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand version" -s c -l config-path -r -F +complete -c kanidmd -n "__fish_kanidmd_using_subcommand version" -s o -l output -d 'Output formatting' -r +complete -c kanidmd -n "__fish_kanidmd_using_subcommand version" -s h -l help -d 'Print help' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and not __fish_seen_subcommand_from server configtest cert-generate recover-account disable-account show-replication-certificate renew-replication-certificate refresh-replication-consumer db-scan database domain healthcheck version help" -f -a "server" -d 'Start the IDM Server' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and not __fish_seen_subcommand_from server configtest cert-generate recover-account disable-account show-replication-certificate renew-replication-certificate refresh-replication-consumer db-scan database domain healthcheck version help" -f -a "configtest" -d 'Test the IDM Server configuration, without starting network listeners' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and not __fish_seen_subcommand_from server configtest cert-generate recover-account disable-account show-replication-certificate renew-replication-certificate refresh-replication-consumer db-scan database domain healthcheck version help" -f -a "cert-generate" -d 'Create a self-signed ca and tls certificate in the locations listed from the configuration. These certificates should *not* be used in production, they are for testing and evaluation only!' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and not __fish_seen_subcommand_from server configtest cert-generate recover-account disable-account show-replication-certificate renew-replication-certificate refresh-replication-consumer db-scan database domain healthcheck version help" -f -a "recover-account" -d 'Recover an account\'s password' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and not __fish_seen_subcommand_from server configtest cert-generate recover-account disable-account show-replication-certificate renew-replication-certificate refresh-replication-consumer db-scan database domain healthcheck version help" -f -a "disable-account" -d 'Disable an account so that it can not be used. This can be reset with `recover-account`' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and not __fish_seen_subcommand_from server configtest cert-generate recover-account disable-account show-replication-certificate renew-replication-certificate refresh-replication-consumer db-scan database domain healthcheck version help" -f -a "show-replication-certificate" -d 'Display this server\'s replication certificate' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and not __fish_seen_subcommand_from server configtest cert-generate recover-account disable-account show-replication-certificate renew-replication-certificate refresh-replication-consumer db-scan database domain healthcheck version help" -f -a "renew-replication-certificate" -d 'Renew this server\'s replication certificate' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and not __fish_seen_subcommand_from server configtest cert-generate recover-account disable-account show-replication-certificate renew-replication-certificate refresh-replication-consumer db-scan database domain healthcheck version help" -f -a "refresh-replication-consumer" -d 'Refresh this servers database content with the content from a supplier. This means that all local content will be deleted and replaced with the supplier content' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and not __fish_seen_subcommand_from server configtest cert-generate recover-account disable-account show-replication-certificate renew-replication-certificate refresh-replication-consumer db-scan database domain healthcheck version help" -f -a "db-scan" -d 'Inspect the internal content of the database datastructures' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and not __fish_seen_subcommand_from server configtest cert-generate recover-account disable-account show-replication-certificate renew-replication-certificate refresh-replication-consumer db-scan database domain healthcheck version help" -f -a "database" -d 'Database maintenance, backups, restoration etc' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and not __fish_seen_subcommand_from server configtest cert-generate recover-account disable-account show-replication-certificate renew-replication-certificate refresh-replication-consumer db-scan database domain healthcheck version help" -f -a "domain" -d 'Change domain settings' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and not __fish_seen_subcommand_from server configtest cert-generate recover-account disable-account show-replication-certificate renew-replication-certificate refresh-replication-consumer db-scan database domain healthcheck version help" -f -a "healthcheck" -d 'Load the server config and check services are listening' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and not __fish_seen_subcommand_from server configtest cert-generate recover-account disable-account show-replication-certificate renew-replication-certificate refresh-replication-consumer db-scan database domain healthcheck version help" -f -a "version" -d 'Print the program version and exit' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and not __fish_seen_subcommand_from server configtest cert-generate recover-account disable-account show-replication-certificate renew-replication-certificate refresh-replication-consumer db-scan database domain healthcheck version help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and __fish_seen_subcommand_from db-scan" -f -a "list-all-indexes" -d 'List all index tables that exist on the system' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and __fish_seen_subcommand_from db-scan" -f -a "list-index" -d 'List all content of a named index' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and __fish_seen_subcommand_from db-scan" -f -a "list-id2entry" -d 'List all id2entry values with reduced entry content' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and __fish_seen_subcommand_from db-scan" -f -a "get-id2entry" -d 'View the data of a specific entry from id2entry' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and __fish_seen_subcommand_from db-scan" -f -a "list-index-analysis" -d 'List all content of index analysis' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and __fish_seen_subcommand_from db-scan" -f -a "quarantine-id2entry" -d 'Given an entry id, quarantine the entry in a hidden db partition' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and __fish_seen_subcommand_from db-scan" -f -a "list-quarantined" -d 'List the entries in quarantine' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and __fish_seen_subcommand_from db-scan" -f -a "restore-quarantined" -d 'Given an entry id, restore the entry from the hidden db partition' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and __fish_seen_subcommand_from database" -f -a "vacuum" -d 'Vacuum the database to reclaim space or change db_fs_type/page_size (offline)' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and __fish_seen_subcommand_from database" -f -a "backup" -d 'Backup the database content (offline)' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and __fish_seen_subcommand_from database" -f -a "restore" -d 'Restore the database content (offline)' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and __fish_seen_subcommand_from database" -f -a "verify" -d 'Verify database and entity consistency' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and __fish_seen_subcommand_from database" -f -a "reindex" -d 'Reindex the database (offline)' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and __fish_seen_subcommand_from domain" -f -a "show" -d 'Show the current domain' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and __fish_seen_subcommand_from domain" -f -a "rename" -d 'Change the IDM domain name based on the values in the configuration' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and __fish_seen_subcommand_from domain" -f -a "upgrade-check" -d 'Perform a pre-upgrade-check of this domains content. This will report possible incompatibilities that can block a successful upgrade to the next version of Kanidm. This is a safe read only operation' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and __fish_seen_subcommand_from domain" -f -a "raise" -d '⚠️ Do not use this command unless directed by a project member. ⚠️ - Raise the functional level of this domain to the maximum available' +complete -c kanidmd -n "__fish_kanidmd_using_subcommand help; and __fish_seen_subcommand_from domain" -f -a "remigrate" -d '⚠️ Do not use this command unless directed by a project member. ⚠️ - Rerun migrations of this domains database, optionally nominating the level to start from' diff --git a/net-nds/kanidmd/files/kanidmd.zsh b/net-nds/kanidmd/files/kanidmd.zsh new file mode 100644 index 0000000..e5dc4f7 --- /dev/null +++ b/net-nds/kanidmd/files/kanidmd.zsh @@ -0,0 +1,1261 @@ +#compdef kanidmd + +autoload -U is-at-least + +_kanidmd() { + typeset -A opt_args + typeset -a _arguments_options + local ret=1 + + if is-at-least 5.2; then + _arguments_options=(-s -S -C) + else + _arguments_options=(-s -C) + fi + + local context curcontext="$curcontext" state line + _arguments "${_arguments_options[@]}" : \ +'-c+[]:CONFIG_PATH:_files' \ +'--config-path=[]:CONFIG_PATH:_files' \ +'-o+[Output formatting]:OUTPUT_MODE:_default' \ +'--output=[Output formatting]:OUTPUT_MODE:_default' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_kanidmd_commands" \ +"*::: :->kanidmd" \ +&& ret=0 + case $state in + (kanidmd) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:kanidmd-command-$line[1]:" + case $line[1] in + (server) +_arguments "${_arguments_options[@]}" : \ +'-c+[]:CONFIG_PATH:_files' \ +'--config-path=[]:CONFIG_PATH:_files' \ +'-o+[Output formatting]:OUTPUT_MODE:_default' \ +'--output=[Output formatting]:OUTPUT_MODE:_default' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(configtest) +_arguments "${_arguments_options[@]}" : \ +'-c+[]:CONFIG_PATH:_files' \ +'--config-path=[]:CONFIG_PATH:_files' \ +'-o+[Output formatting]:OUTPUT_MODE:_default' \ +'--output=[Output formatting]:OUTPUT_MODE:_default' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(cert-generate) +_arguments "${_arguments_options[@]}" : \ +'-c+[]:CONFIG_PATH:_files' \ +'--config-path=[]:CONFIG_PATH:_files' \ +'-o+[Output formatting]:OUTPUT_MODE:_default' \ +'--output=[Output formatting]:OUTPUT_MODE:_default' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(recover-account) +_arguments "${_arguments_options[@]}" : \ +'-c+[]:CONFIG_PATH:_files' \ +'--config-path=[]:CONFIG_PATH:_files' \ +'-o+[Output formatting]:OUTPUT_MODE:_default' \ +'--output=[Output formatting]:OUTPUT_MODE:_default' \ +'-h[Print help]' \ +'--help[Print help]' \ +':name -- The account name to recover credentials for:_default' \ +&& ret=0 +;; +(disable-account) +_arguments "${_arguments_options[@]}" : \ +'-c+[]:CONFIG_PATH:_files' \ +'--config-path=[]:CONFIG_PATH:_files' \ +'-o+[Output formatting]:OUTPUT_MODE:_default' \ +'--output=[Output formatting]:OUTPUT_MODE:_default' \ +'-h[Print help]' \ +'--help[Print help]' \ +':name -- The account name to disable:_default' \ +&& ret=0 +;; +(show-replication-certificate) +_arguments "${_arguments_options[@]}" : \ +'-c+[]:CONFIG_PATH:_files' \ +'--config-path=[]:CONFIG_PATH:_files' \ +'-o+[Output formatting]:OUTPUT_MODE:_default' \ +'--output=[Output formatting]:OUTPUT_MODE:_default' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(renew-replication-certificate) +_arguments "${_arguments_options[@]}" : \ +'-c+[]:CONFIG_PATH:_files' \ +'--config-path=[]:CONFIG_PATH:_files' \ +'-o+[Output formatting]:OUTPUT_MODE:_default' \ +'--output=[Output formatting]:OUTPUT_MODE:_default' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(refresh-replication-consumer) +_arguments "${_arguments_options[@]}" : \ +'-c+[]:CONFIG_PATH:_files' \ +'--config-path=[]:CONFIG_PATH:_files' \ +'-o+[Output formatting]:OUTPUT_MODE:_default' \ +'--output=[Output formatting]:OUTPUT_MODE:_default' \ +'--i-want-to-refresh-this-servers-database[Acknowledge that this database content will be refreshed from a supplier]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(db-scan) +_arguments "${_arguments_options[@]}" : \ +'-c+[]:CONFIG_PATH:_files' \ +'--config-path=[]:CONFIG_PATH:_files' \ +'-o+[Output formatting]:OUTPUT_MODE:_default' \ +'--output=[Output formatting]:OUTPUT_MODE:_default' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_kanidmd__db-scan_commands" \ +"*::: :->db-scan" \ +&& ret=0 + + case $state in + (db-scan) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:kanidmd-db-scan-command-$line[1]:" + case $line[1] in + (list-all-indexes) +_arguments "${_arguments_options[@]}" : \ +'-c+[]:CONFIG_PATH:_files' \ +'--config-path=[]:CONFIG_PATH:_files' \ +'-o+[Output formatting]:OUTPUT_MODE:_default' \ +'--output=[Output formatting]:OUTPUT_MODE:_default' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(list-index) +_arguments "${_arguments_options[@]}" : \ +'-c+[]:CONFIG_PATH:_files' \ +'--config-path=[]:CONFIG_PATH:_files' \ +'-o+[Output formatting]:OUTPUT_MODE:_default' \ +'--output=[Output formatting]:OUTPUT_MODE:_default' \ +'-h[Print help]' \ +'--help[Print help]' \ +':index_name -- The name of the index to list:_default' \ +&& ret=0 +;; +(list-id2entry) +_arguments "${_arguments_options[@]}" : \ +'-c+[]:CONFIG_PATH:_files' \ +'--config-path=[]:CONFIG_PATH:_files' \ +'-o+[Output formatting]:OUTPUT_MODE:_default' \ +'--output=[Output formatting]:OUTPUT_MODE:_default' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(get-id2entry) +_arguments "${_arguments_options[@]}" : \ +'-c+[]:CONFIG_PATH:_files' \ +'--config-path=[]:CONFIG_PATH:_files' \ +'-o+[Output formatting]:OUTPUT_MODE:_default' \ +'--output=[Output formatting]:OUTPUT_MODE:_default' \ +'-h[Print help]' \ +'--help[Print help]' \ +':id -- The id of the entry to display:_default' \ +&& ret=0 +;; +(list-index-analysis) +_arguments "${_arguments_options[@]}" : \ +'-c+[]:CONFIG_PATH:_files' \ +'--config-path=[]:CONFIG_PATH:_files' \ +'-o+[Output formatting]:OUTPUT_MODE:_default' \ +'--output=[Output formatting]:OUTPUT_MODE:_default' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(quarantine-id2entry) +_arguments "${_arguments_options[@]}" : \ +'-c+[]:CONFIG_PATH:_files' \ +'--config-path=[]:CONFIG_PATH:_files' \ +'-o+[Output formatting]:OUTPUT_MODE:_default' \ +'--output=[Output formatting]:OUTPUT_MODE:_default' \ +'-h[Print help]' \ +'--help[Print help]' \ +':id -- The id of the entry to display:_default' \ +&& ret=0 +;; +(list-quarantined) +_arguments "${_arguments_options[@]}" : \ +'-c+[]:CONFIG_PATH:_files' \ +'--config-path=[]:CONFIG_PATH:_files' \ +'-o+[Output formatting]:OUTPUT_MODE:_default' \ +'--output=[Output formatting]:OUTPUT_MODE:_default' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(restore-quarantined) +_arguments "${_arguments_options[@]}" : \ +'-c+[]:CONFIG_PATH:_files' \ +'--config-path=[]:CONFIG_PATH:_files' \ +'-o+[Output formatting]:OUTPUT_MODE:_default' \ +'--output=[Output formatting]:OUTPUT_MODE:_default' \ +'-h[Print help]' \ +'--help[Print help]' \ +':id -- The id of the entry to display:_default' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_kanidmd__db-scan__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:kanidmd-db-scan-help-command-$line[1]:" + case $line[1] in + (list-all-indexes) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(list-index) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(list-id2entry) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(get-id2entry) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(list-index-analysis) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(quarantine-id2entry) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(list-quarantined) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(restore-quarantined) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(database) +_arguments "${_arguments_options[@]}" : \ +'-c+[]:CONFIG_PATH:_files' \ +'--config-path=[]:CONFIG_PATH:_files' \ +'-o+[Output formatting]:OUTPUT_MODE:_default' \ +'--output=[Output formatting]:OUTPUT_MODE:_default' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_kanidmd__database_commands" \ +"*::: :->database" \ +&& ret=0 + + case $state in + (database) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:kanidmd-database-command-$line[1]:" + case $line[1] in + (vacuum) +_arguments "${_arguments_options[@]}" : \ +'-c+[]:CONFIG_PATH:_files' \ +'--config-path=[]:CONFIG_PATH:_files' \ +'-o+[Output formatting]:OUTPUT_MODE:_default' \ +'--output=[Output formatting]:OUTPUT_MODE:_default' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(backup) +_arguments "${_arguments_options[@]}" : \ +'-C+[Compression method]:COMPRESSION:_default' \ +'--compression=[Compression method]:COMPRESSION:_default' \ +'-c+[]:CONFIG_PATH:_files' \ +'--config-path=[]:CONFIG_PATH:_files' \ +'-o+[Output formatting]:OUTPUT_MODE:_default' \ +'--output=[Output formatting]:OUTPUT_MODE:_default' \ +'-h[Print help]' \ +'--help[Print help]' \ +':path -- Output path for the backup content:_files' \ +&& ret=0 +;; +(restore) +_arguments "${_arguments_options[@]}" : \ +'-c+[]:CONFIG_PATH:_files' \ +'--config-path=[]:CONFIG_PATH:_files' \ +'-o+[Output formatting]:OUTPUT_MODE:_default' \ +'--output=[Output formatting]:OUTPUT_MODE:_default' \ +'-h[Print help]' \ +'--help[Print help]' \ +':path -- Restore from this path. Should be created with "backup":_files' \ +&& ret=0 +;; +(verify) +_arguments "${_arguments_options[@]}" : \ +'-c+[]:CONFIG_PATH:_files' \ +'--config-path=[]:CONFIG_PATH:_files' \ +'-o+[Output formatting]:OUTPUT_MODE:_default' \ +'--output=[Output formatting]:OUTPUT_MODE:_default' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(reindex) +_arguments "${_arguments_options[@]}" : \ +'-c+[]:CONFIG_PATH:_files' \ +'--config-path=[]:CONFIG_PATH:_files' \ +'-o+[Output formatting]:OUTPUT_MODE:_default' \ +'--output=[Output formatting]:OUTPUT_MODE:_default' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_kanidmd__database__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:kanidmd-database-help-command-$line[1]:" + case $line[1] in + (vacuum) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(backup) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(restore) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(verify) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(reindex) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(domain) +_arguments "${_arguments_options[@]}" : \ +'-c+[]:CONFIG_PATH:_files' \ +'--config-path=[]:CONFIG_PATH:_files' \ +'-o+[Output formatting]:OUTPUT_MODE:_default' \ +'--output=[Output formatting]:OUTPUT_MODE:_default' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_kanidmd__domain_commands" \ +"*::: :->domain" \ +&& ret=0 + + case $state in + (domain) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:kanidmd-domain-command-$line[1]:" + case $line[1] in + (show) +_arguments "${_arguments_options[@]}" : \ +'-c+[]:CONFIG_PATH:_files' \ +'--config-path=[]:CONFIG_PATH:_files' \ +'-o+[Output formatting]:OUTPUT_MODE:_default' \ +'--output=[Output formatting]:OUTPUT_MODE:_default' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(rename) +_arguments "${_arguments_options[@]}" : \ +'-c+[]:CONFIG_PATH:_files' \ +'--config-path=[]:CONFIG_PATH:_files' \ +'-o+[Output formatting]:OUTPUT_MODE:_default' \ +'--output=[Output formatting]:OUTPUT_MODE:_default' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(upgrade-check) +_arguments "${_arguments_options[@]}" : \ +'-c+[]:CONFIG_PATH:_files' \ +'--config-path=[]:CONFIG_PATH:_files' \ +'-o+[Output formatting]:OUTPUT_MODE:_default' \ +'--output=[Output formatting]:OUTPUT_MODE:_default' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(raise) +_arguments "${_arguments_options[@]}" : \ +'-c+[]:CONFIG_PATH:_files' \ +'--config-path=[]:CONFIG_PATH:_files' \ +'-o+[Output formatting]:OUTPUT_MODE:_default' \ +'--output=[Output formatting]:OUTPUT_MODE:_default' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(remigrate) +_arguments "${_arguments_options[@]}" : \ +'-c+[]:CONFIG_PATH:_files' \ +'--config-path=[]:CONFIG_PATH:_files' \ +'-o+[Output formatting]:OUTPUT_MODE:_default' \ +'--output=[Output formatting]:OUTPUT_MODE:_default' \ +'-h[Print help]' \ +'--help[Print help]' \ +'::level:_default' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_kanidmd__domain__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:kanidmd-domain-help-command-$line[1]:" + case $line[1] in + (show) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(rename) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(upgrade-check) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(raise) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(remigrate) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(healthcheck) +_arguments "${_arguments_options[@]}" : \ +'-c+[]:CONFIG_PATH:_files' \ +'--config-path=[]:CONFIG_PATH:_files' \ +'-o+[Output formatting]:OUTPUT_MODE:_default' \ +'--output=[Output formatting]:OUTPUT_MODE:_default' \ +'-v[Disable TLS verification]' \ +'--verify-tls[Disable TLS verification]' \ +'-O[Check the '\''origin'\'' URL from the server configuration file, instead of the '\''address'\'']' \ +'--check-origin[Check the '\''origin'\'' URL from the server configuration file, instead of the '\''address'\'']' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(version) +_arguments "${_arguments_options[@]}" : \ +'-c+[]:CONFIG_PATH:_files' \ +'--config-path=[]:CONFIG_PATH:_files' \ +'-o+[Output formatting]:OUTPUT_MODE:_default' \ +'--output=[Output formatting]:OUTPUT_MODE:_default' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_kanidmd__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:kanidmd-help-command-$line[1]:" + case $line[1] in + (server) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(configtest) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(cert-generate) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(recover-account) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(disable-account) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(show-replication-certificate) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(renew-replication-certificate) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(refresh-replication-consumer) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(db-scan) +_arguments "${_arguments_options[@]}" : \ +":: :_kanidmd__help__db-scan_commands" \ +"*::: :->db-scan" \ +&& ret=0 + + case $state in + (db-scan) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:kanidmd-help-db-scan-command-$line[1]:" + case $line[1] in + (list-all-indexes) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(list-index) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(list-id2entry) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(get-id2entry) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(list-index-analysis) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(quarantine-id2entry) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(list-quarantined) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(restore-quarantined) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(database) +_arguments "${_arguments_options[@]}" : \ +":: :_kanidmd__help__database_commands" \ +"*::: :->database" \ +&& ret=0 + + case $state in + (database) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:kanidmd-help-database-command-$line[1]:" + case $line[1] in + (vacuum) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(backup) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(restore) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(verify) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(reindex) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(domain) +_arguments "${_arguments_options[@]}" : \ +":: :_kanidmd__help__domain_commands" \ +"*::: :->domain" \ +&& ret=0 + + case $state in + (domain) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:kanidmd-help-domain-command-$line[1]:" + case $line[1] in + (show) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(rename) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(upgrade-check) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(raise) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(remigrate) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(healthcheck) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(version) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +} + +(( $+functions[_kanidmd_commands] )) || +_kanidmd_commands() { + local commands; commands=( +'server:Start the IDM Server' \ +'configtest:Test the IDM Server configuration, without starting network listeners' \ +'cert-generate:Create a self-signed ca and tls certificate in the locations listed from the configuration. These certificates should *not* be used in production, they are for testing and evaluation only!' \ +'recover-account:Recover an account'\''s password' \ +'disable-account:Disable an account so that it can not be used. This can be reset with \`recover-account\`' \ +'show-replication-certificate:Display this server'\''s replication certificate' \ +'renew-replication-certificate:Renew this server'\''s replication certificate' \ +'refresh-replication-consumer:Refresh this servers database content with the content from a supplier. This means that all local content will be deleted and replaced with the supplier content' \ +'db-scan:Inspect the internal content of the database datastructures' \ +'database:Database maintenance, backups, restoration etc' \ +'domain:Change domain settings' \ +'healthcheck:Load the server config and check services are listening' \ +'version:Print the program version and exit' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'kanidmd commands' commands "$@" +} +(( $+functions[_kanidmd__cert-generate_commands] )) || +_kanidmd__cert-generate_commands() { + local commands; commands=() + _describe -t commands 'kanidmd cert-generate commands' commands "$@" +} +(( $+functions[_kanidmd__configtest_commands] )) || +_kanidmd__configtest_commands() { + local commands; commands=() + _describe -t commands 'kanidmd configtest commands' commands "$@" +} +(( $+functions[_kanidmd__database_commands] )) || +_kanidmd__database_commands() { + local commands; commands=( +'vacuum:Vacuum the database to reclaim space or change db_fs_type/page_size (offline)' \ +'backup:Backup the database content (offline)' \ +'restore:Restore the database content (offline)' \ +'verify:Verify database and entity consistency' \ +'reindex:Reindex the database (offline)' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'kanidmd database commands' commands "$@" +} +(( $+functions[_kanidmd__database__backup_commands] )) || +_kanidmd__database__backup_commands() { + local commands; commands=() + _describe -t commands 'kanidmd database backup commands' commands "$@" +} +(( $+functions[_kanidmd__database__help_commands] )) || +_kanidmd__database__help_commands() { + local commands; commands=( +'vacuum:Vacuum the database to reclaim space or change db_fs_type/page_size (offline)' \ +'backup:Backup the database content (offline)' \ +'restore:Restore the database content (offline)' \ +'verify:Verify database and entity consistency' \ +'reindex:Reindex the database (offline)' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'kanidmd database help commands' commands "$@" +} +(( $+functions[_kanidmd__database__help__backup_commands] )) || +_kanidmd__database__help__backup_commands() { + local commands; commands=() + _describe -t commands 'kanidmd database help backup commands' commands "$@" +} +(( $+functions[_kanidmd__database__help__help_commands] )) || +_kanidmd__database__help__help_commands() { + local commands; commands=() + _describe -t commands 'kanidmd database help help commands' commands "$@" +} +(( $+functions[_kanidmd__database__help__reindex_commands] )) || +_kanidmd__database__help__reindex_commands() { + local commands; commands=() + _describe -t commands 'kanidmd database help reindex commands' commands "$@" +} +(( $+functions[_kanidmd__database__help__restore_commands] )) || +_kanidmd__database__help__restore_commands() { + local commands; commands=() + _describe -t commands 'kanidmd database help restore commands' commands "$@" +} +(( $+functions[_kanidmd__database__help__vacuum_commands] )) || +_kanidmd__database__help__vacuum_commands() { + local commands; commands=() + _describe -t commands 'kanidmd database help vacuum commands' commands "$@" +} +(( $+functions[_kanidmd__database__help__verify_commands] )) || +_kanidmd__database__help__verify_commands() { + local commands; commands=() + _describe -t commands 'kanidmd database help verify commands' commands "$@" +} +(( $+functions[_kanidmd__database__reindex_commands] )) || +_kanidmd__database__reindex_commands() { + local commands; commands=() + _describe -t commands 'kanidmd database reindex commands' commands "$@" +} +(( $+functions[_kanidmd__database__restore_commands] )) || +_kanidmd__database__restore_commands() { + local commands; commands=() + _describe -t commands 'kanidmd database restore commands' commands "$@" +} +(( $+functions[_kanidmd__database__vacuum_commands] )) || +_kanidmd__database__vacuum_commands() { + local commands; commands=() + _describe -t commands 'kanidmd database vacuum commands' commands "$@" +} +(( $+functions[_kanidmd__database__verify_commands] )) || +_kanidmd__database__verify_commands() { + local commands; commands=() + _describe -t commands 'kanidmd database verify commands' commands "$@" +} +(( $+functions[_kanidmd__db-scan_commands] )) || +_kanidmd__db-scan_commands() { + local commands; commands=( +'list-all-indexes:List all index tables that exist on the system' \ +'list-index:List all content of a named index' \ +'list-id2entry:List all id2entry values with reduced entry content' \ +'get-id2entry:View the data of a specific entry from id2entry' \ +'list-index-analysis:List all content of index analysis' \ +'quarantine-id2entry:Given an entry id, quarantine the entry in a hidden db partition' \ +'list-quarantined:List the entries in quarantine' \ +'restore-quarantined:Given an entry id, restore the entry from the hidden db partition' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'kanidmd db-scan commands' commands "$@" +} +(( $+functions[_kanidmd__db-scan__get-id2entry_commands] )) || +_kanidmd__db-scan__get-id2entry_commands() { + local commands; commands=() + _describe -t commands 'kanidmd db-scan get-id2entry commands' commands "$@" +} +(( $+functions[_kanidmd__db-scan__help_commands] )) || +_kanidmd__db-scan__help_commands() { + local commands; commands=( +'list-all-indexes:List all index tables that exist on the system' \ +'list-index:List all content of a named index' \ +'list-id2entry:List all id2entry values with reduced entry content' \ +'get-id2entry:View the data of a specific entry from id2entry' \ +'list-index-analysis:List all content of index analysis' \ +'quarantine-id2entry:Given an entry id, quarantine the entry in a hidden db partition' \ +'list-quarantined:List the entries in quarantine' \ +'restore-quarantined:Given an entry id, restore the entry from the hidden db partition' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'kanidmd db-scan help commands' commands "$@" +} +(( $+functions[_kanidmd__db-scan__help__get-id2entry_commands] )) || +_kanidmd__db-scan__help__get-id2entry_commands() { + local commands; commands=() + _describe -t commands 'kanidmd db-scan help get-id2entry commands' commands "$@" +} +(( $+functions[_kanidmd__db-scan__help__help_commands] )) || +_kanidmd__db-scan__help__help_commands() { + local commands; commands=() + _describe -t commands 'kanidmd db-scan help help commands' commands "$@" +} +(( $+functions[_kanidmd__db-scan__help__list-all-indexes_commands] )) || +_kanidmd__db-scan__help__list-all-indexes_commands() { + local commands; commands=() + _describe -t commands 'kanidmd db-scan help list-all-indexes commands' commands "$@" +} +(( $+functions[_kanidmd__db-scan__help__list-id2entry_commands] )) || +_kanidmd__db-scan__help__list-id2entry_commands() { + local commands; commands=() + _describe -t commands 'kanidmd db-scan help list-id2entry commands' commands "$@" +} +(( $+functions[_kanidmd__db-scan__help__list-index_commands] )) || +_kanidmd__db-scan__help__list-index_commands() { + local commands; commands=() + _describe -t commands 'kanidmd db-scan help list-index commands' commands "$@" +} +(( $+functions[_kanidmd__db-scan__help__list-index-analysis_commands] )) || +_kanidmd__db-scan__help__list-index-analysis_commands() { + local commands; commands=() + _describe -t commands 'kanidmd db-scan help list-index-analysis commands' commands "$@" +} +(( $+functions[_kanidmd__db-scan__help__list-quarantined_commands] )) || +_kanidmd__db-scan__help__list-quarantined_commands() { + local commands; commands=() + _describe -t commands 'kanidmd db-scan help list-quarantined commands' commands "$@" +} +(( $+functions[_kanidmd__db-scan__help__quarantine-id2entry_commands] )) || +_kanidmd__db-scan__help__quarantine-id2entry_commands() { + local commands; commands=() + _describe -t commands 'kanidmd db-scan help quarantine-id2entry commands' commands "$@" +} +(( $+functions[_kanidmd__db-scan__help__restore-quarantined_commands] )) || +_kanidmd__db-scan__help__restore-quarantined_commands() { + local commands; commands=() + _describe -t commands 'kanidmd db-scan help restore-quarantined commands' commands "$@" +} +(( $+functions[_kanidmd__db-scan__list-all-indexes_commands] )) || +_kanidmd__db-scan__list-all-indexes_commands() { + local commands; commands=() + _describe -t commands 'kanidmd db-scan list-all-indexes commands' commands "$@" +} +(( $+functions[_kanidmd__db-scan__list-id2entry_commands] )) || +_kanidmd__db-scan__list-id2entry_commands() { + local commands; commands=() + _describe -t commands 'kanidmd db-scan list-id2entry commands' commands "$@" +} +(( $+functions[_kanidmd__db-scan__list-index_commands] )) || +_kanidmd__db-scan__list-index_commands() { + local commands; commands=() + _describe -t commands 'kanidmd db-scan list-index commands' commands "$@" +} +(( $+functions[_kanidmd__db-scan__list-index-analysis_commands] )) || +_kanidmd__db-scan__list-index-analysis_commands() { + local commands; commands=() + _describe -t commands 'kanidmd db-scan list-index-analysis commands' commands "$@" +} +(( $+functions[_kanidmd__db-scan__list-quarantined_commands] )) || +_kanidmd__db-scan__list-quarantined_commands() { + local commands; commands=() + _describe -t commands 'kanidmd db-scan list-quarantined commands' commands "$@" +} +(( $+functions[_kanidmd__db-scan__quarantine-id2entry_commands] )) || +_kanidmd__db-scan__quarantine-id2entry_commands() { + local commands; commands=() + _describe -t commands 'kanidmd db-scan quarantine-id2entry commands' commands "$@" +} +(( $+functions[_kanidmd__db-scan__restore-quarantined_commands] )) || +_kanidmd__db-scan__restore-quarantined_commands() { + local commands; commands=() + _describe -t commands 'kanidmd db-scan restore-quarantined commands' commands "$@" +} +(( $+functions[_kanidmd__disable-account_commands] )) || +_kanidmd__disable-account_commands() { + local commands; commands=() + _describe -t commands 'kanidmd disable-account commands' commands "$@" +} +(( $+functions[_kanidmd__domain_commands] )) || +_kanidmd__domain_commands() { + local commands; commands=( +'show:Show the current domain' \ +'rename:Change the IDM domain name based on the values in the configuration' \ +'upgrade-check:Perform a pre-upgrade-check of this domains content. This will report possible incompatibilities that can block a successful upgrade to the next version of Kanidm. This is a safe read only operation' \ +'raise:⚠️ Do not use this command unless directed by a project member. ⚠️ - Raise the functional level of this domain to the maximum available' \ +'remigrate:⚠️ Do not use this command unless directed by a project member. ⚠️ - Rerun migrations of this domains database, optionally nominating the level to start from' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'kanidmd domain commands' commands "$@" +} +(( $+functions[_kanidmd__domain__help_commands] )) || +_kanidmd__domain__help_commands() { + local commands; commands=( +'show:Show the current domain' \ +'rename:Change the IDM domain name based on the values in the configuration' \ +'upgrade-check:Perform a pre-upgrade-check of this domains content. This will report possible incompatibilities that can block a successful upgrade to the next version of Kanidm. This is a safe read only operation' \ +'raise:⚠️ Do not use this command unless directed by a project member. ⚠️ - Raise the functional level of this domain to the maximum available' \ +'remigrate:⚠️ Do not use this command unless directed by a project member. ⚠️ - Rerun migrations of this domains database, optionally nominating the level to start from' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'kanidmd domain help commands' commands "$@" +} +(( $+functions[_kanidmd__domain__help__help_commands] )) || +_kanidmd__domain__help__help_commands() { + local commands; commands=() + _describe -t commands 'kanidmd domain help help commands' commands "$@" +} +(( $+functions[_kanidmd__domain__help__raise_commands] )) || +_kanidmd__domain__help__raise_commands() { + local commands; commands=() + _describe -t commands 'kanidmd domain help raise commands' commands "$@" +} +(( $+functions[_kanidmd__domain__help__remigrate_commands] )) || +_kanidmd__domain__help__remigrate_commands() { + local commands; commands=() + _describe -t commands 'kanidmd domain help remigrate commands' commands "$@" +} +(( $+functions[_kanidmd__domain__help__rename_commands] )) || +_kanidmd__domain__help__rename_commands() { + local commands; commands=() + _describe -t commands 'kanidmd domain help rename commands' commands "$@" +} +(( $+functions[_kanidmd__domain__help__show_commands] )) || +_kanidmd__domain__help__show_commands() { + local commands; commands=() + _describe -t commands 'kanidmd domain help show commands' commands "$@" +} +(( $+functions[_kanidmd__domain__help__upgrade-check_commands] )) || +_kanidmd__domain__help__upgrade-check_commands() { + local commands; commands=() + _describe -t commands 'kanidmd domain help upgrade-check commands' commands "$@" +} +(( $+functions[_kanidmd__domain__raise_commands] )) || +_kanidmd__domain__raise_commands() { + local commands; commands=() + _describe -t commands 'kanidmd domain raise commands' commands "$@" +} +(( $+functions[_kanidmd__domain__remigrate_commands] )) || +_kanidmd__domain__remigrate_commands() { + local commands; commands=() + _describe -t commands 'kanidmd domain remigrate commands' commands "$@" +} +(( $+functions[_kanidmd__domain__rename_commands] )) || +_kanidmd__domain__rename_commands() { + local commands; commands=() + _describe -t commands 'kanidmd domain rename commands' commands "$@" +} +(( $+functions[_kanidmd__domain__show_commands] )) || +_kanidmd__domain__show_commands() { + local commands; commands=() + _describe -t commands 'kanidmd domain show commands' commands "$@" +} +(( $+functions[_kanidmd__domain__upgrade-check_commands] )) || +_kanidmd__domain__upgrade-check_commands() { + local commands; commands=() + _describe -t commands 'kanidmd domain upgrade-check commands' commands "$@" +} +(( $+functions[_kanidmd__healthcheck_commands] )) || +_kanidmd__healthcheck_commands() { + local commands; commands=() + _describe -t commands 'kanidmd healthcheck commands' commands "$@" +} +(( $+functions[_kanidmd__help_commands] )) || +_kanidmd__help_commands() { + local commands; commands=( +'server:Start the IDM Server' \ +'configtest:Test the IDM Server configuration, without starting network listeners' \ +'cert-generate:Create a self-signed ca and tls certificate in the locations listed from the configuration. These certificates should *not* be used in production, they are for testing and evaluation only!' \ +'recover-account:Recover an account'\''s password' \ +'disable-account:Disable an account so that it can not be used. This can be reset with \`recover-account\`' \ +'show-replication-certificate:Display this server'\''s replication certificate' \ +'renew-replication-certificate:Renew this server'\''s replication certificate' \ +'refresh-replication-consumer:Refresh this servers database content with the content from a supplier. This means that all local content will be deleted and replaced with the supplier content' \ +'db-scan:Inspect the internal content of the database datastructures' \ +'database:Database maintenance, backups, restoration etc' \ +'domain:Change domain settings' \ +'healthcheck:Load the server config and check services are listening' \ +'version:Print the program version and exit' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'kanidmd help commands' commands "$@" +} +(( $+functions[_kanidmd__help__cert-generate_commands] )) || +_kanidmd__help__cert-generate_commands() { + local commands; commands=() + _describe -t commands 'kanidmd help cert-generate commands' commands "$@" +} +(( $+functions[_kanidmd__help__configtest_commands] )) || +_kanidmd__help__configtest_commands() { + local commands; commands=() + _describe -t commands 'kanidmd help configtest commands' commands "$@" +} +(( $+functions[_kanidmd__help__database_commands] )) || +_kanidmd__help__database_commands() { + local commands; commands=( +'vacuum:Vacuum the database to reclaim space or change db_fs_type/page_size (offline)' \ +'backup:Backup the database content (offline)' \ +'restore:Restore the database content (offline)' \ +'verify:Verify database and entity consistency' \ +'reindex:Reindex the database (offline)' \ + ) + _describe -t commands 'kanidmd help database commands' commands "$@" +} +(( $+functions[_kanidmd__help__database__backup_commands] )) || +_kanidmd__help__database__backup_commands() { + local commands; commands=() + _describe -t commands 'kanidmd help database backup commands' commands "$@" +} +(( $+functions[_kanidmd__help__database__reindex_commands] )) || +_kanidmd__help__database__reindex_commands() { + local commands; commands=() + _describe -t commands 'kanidmd help database reindex commands' commands "$@" +} +(( $+functions[_kanidmd__help__database__restore_commands] )) || +_kanidmd__help__database__restore_commands() { + local commands; commands=() + _describe -t commands 'kanidmd help database restore commands' commands "$@" +} +(( $+functions[_kanidmd__help__database__vacuum_commands] )) || +_kanidmd__help__database__vacuum_commands() { + local commands; commands=() + _describe -t commands 'kanidmd help database vacuum commands' commands "$@" +} +(( $+functions[_kanidmd__help__database__verify_commands] )) || +_kanidmd__help__database__verify_commands() { + local commands; commands=() + _describe -t commands 'kanidmd help database verify commands' commands "$@" +} +(( $+functions[_kanidmd__help__db-scan_commands] )) || +_kanidmd__help__db-scan_commands() { + local commands; commands=( +'list-all-indexes:List all index tables that exist on the system' \ +'list-index:List all content of a named index' \ +'list-id2entry:List all id2entry values with reduced entry content' \ +'get-id2entry:View the data of a specific entry from id2entry' \ +'list-index-analysis:List all content of index analysis' \ +'quarantine-id2entry:Given an entry id, quarantine the entry in a hidden db partition' \ +'list-quarantined:List the entries in quarantine' \ +'restore-quarantined:Given an entry id, restore the entry from the hidden db partition' \ + ) + _describe -t commands 'kanidmd help db-scan commands' commands "$@" +} +(( $+functions[_kanidmd__help__db-scan__get-id2entry_commands] )) || +_kanidmd__help__db-scan__get-id2entry_commands() { + local commands; commands=() + _describe -t commands 'kanidmd help db-scan get-id2entry commands' commands "$@" +} +(( $+functions[_kanidmd__help__db-scan__list-all-indexes_commands] )) || +_kanidmd__help__db-scan__list-all-indexes_commands() { + local commands; commands=() + _describe -t commands 'kanidmd help db-scan list-all-indexes commands' commands "$@" +} +(( $+functions[_kanidmd__help__db-scan__list-id2entry_commands] )) || +_kanidmd__help__db-scan__list-id2entry_commands() { + local commands; commands=() + _describe -t commands 'kanidmd help db-scan list-id2entry commands' commands "$@" +} +(( $+functions[_kanidmd__help__db-scan__list-index_commands] )) || +_kanidmd__help__db-scan__list-index_commands() { + local commands; commands=() + _describe -t commands 'kanidmd help db-scan list-index commands' commands "$@" +} +(( $+functions[_kanidmd__help__db-scan__list-index-analysis_commands] )) || +_kanidmd__help__db-scan__list-index-analysis_commands() { + local commands; commands=() + _describe -t commands 'kanidmd help db-scan list-index-analysis commands' commands "$@" +} +(( $+functions[_kanidmd__help__db-scan__list-quarantined_commands] )) || +_kanidmd__help__db-scan__list-quarantined_commands() { + local commands; commands=() + _describe -t commands 'kanidmd help db-scan list-quarantined commands' commands "$@" +} +(( $+functions[_kanidmd__help__db-scan__quarantine-id2entry_commands] )) || +_kanidmd__help__db-scan__quarantine-id2entry_commands() { + local commands; commands=() + _describe -t commands 'kanidmd help db-scan quarantine-id2entry commands' commands "$@" +} +(( $+functions[_kanidmd__help__db-scan__restore-quarantined_commands] )) || +_kanidmd__help__db-scan__restore-quarantined_commands() { + local commands; commands=() + _describe -t commands 'kanidmd help db-scan restore-quarantined commands' commands "$@" +} +(( $+functions[_kanidmd__help__disable-account_commands] )) || +_kanidmd__help__disable-account_commands() { + local commands; commands=() + _describe -t commands 'kanidmd help disable-account commands' commands "$@" +} +(( $+functions[_kanidmd__help__domain_commands] )) || +_kanidmd__help__domain_commands() { + local commands; commands=( +'show:Show the current domain' \ +'rename:Change the IDM domain name based on the values in the configuration' \ +'upgrade-check:Perform a pre-upgrade-check of this domains content. This will report possible incompatibilities that can block a successful upgrade to the next version of Kanidm. This is a safe read only operation' \ +'raise:⚠️ Do not use this command unless directed by a project member. ⚠️ - Raise the functional level of this domain to the maximum available' \ +'remigrate:⚠️ Do not use this command unless directed by a project member. ⚠️ - Rerun migrations of this domains database, optionally nominating the level to start from' \ + ) + _describe -t commands 'kanidmd help domain commands' commands "$@" +} +(( $+functions[_kanidmd__help__domain__raise_commands] )) || +_kanidmd__help__domain__raise_commands() { + local commands; commands=() + _describe -t commands 'kanidmd help domain raise commands' commands "$@" +} +(( $+functions[_kanidmd__help__domain__remigrate_commands] )) || +_kanidmd__help__domain__remigrate_commands() { + local commands; commands=() + _describe -t commands 'kanidmd help domain remigrate commands' commands "$@" +} +(( $+functions[_kanidmd__help__domain__rename_commands] )) || +_kanidmd__help__domain__rename_commands() { + local commands; commands=() + _describe -t commands 'kanidmd help domain rename commands' commands "$@" +} +(( $+functions[_kanidmd__help__domain__show_commands] )) || +_kanidmd__help__domain__show_commands() { + local commands; commands=() + _describe -t commands 'kanidmd help domain show commands' commands "$@" +} +(( $+functions[_kanidmd__help__domain__upgrade-check_commands] )) || +_kanidmd__help__domain__upgrade-check_commands() { + local commands; commands=() + _describe -t commands 'kanidmd help domain upgrade-check commands' commands "$@" +} +(( $+functions[_kanidmd__help__healthcheck_commands] )) || +_kanidmd__help__healthcheck_commands() { + local commands; commands=() + _describe -t commands 'kanidmd help healthcheck commands' commands "$@" +} +(( $+functions[_kanidmd__help__help_commands] )) || +_kanidmd__help__help_commands() { + local commands; commands=() + _describe -t commands 'kanidmd help help commands' commands "$@" +} +(( $+functions[_kanidmd__help__recover-account_commands] )) || +_kanidmd__help__recover-account_commands() { + local commands; commands=() + _describe -t commands 'kanidmd help recover-account commands' commands "$@" +} +(( $+functions[_kanidmd__help__refresh-replication-consumer_commands] )) || +_kanidmd__help__refresh-replication-consumer_commands() { + local commands; commands=() + _describe -t commands 'kanidmd help refresh-replication-consumer commands' commands "$@" +} +(( $+functions[_kanidmd__help__renew-replication-certificate_commands] )) || +_kanidmd__help__renew-replication-certificate_commands() { + local commands; commands=() + _describe -t commands 'kanidmd help renew-replication-certificate commands' commands "$@" +} +(( $+functions[_kanidmd__help__server_commands] )) || +_kanidmd__help__server_commands() { + local commands; commands=() + _describe -t commands 'kanidmd help server commands' commands "$@" +} +(( $+functions[_kanidmd__help__show-replication-certificate_commands] )) || +_kanidmd__help__show-replication-certificate_commands() { + local commands; commands=() + _describe -t commands 'kanidmd help show-replication-certificate commands' commands "$@" +} +(( $+functions[_kanidmd__help__version_commands] )) || +_kanidmd__help__version_commands() { + local commands; commands=() + _describe -t commands 'kanidmd help version commands' commands "$@" +} +(( $+functions[_kanidmd__recover-account_commands] )) || +_kanidmd__recover-account_commands() { + local commands; commands=() + _describe -t commands 'kanidmd recover-account commands' commands "$@" +} +(( $+functions[_kanidmd__refresh-replication-consumer_commands] )) || +_kanidmd__refresh-replication-consumer_commands() { + local commands; commands=() + _describe -t commands 'kanidmd refresh-replication-consumer commands' commands "$@" +} +(( $+functions[_kanidmd__renew-replication-certificate_commands] )) || +_kanidmd__renew-replication-certificate_commands() { + local commands; commands=() + _describe -t commands 'kanidmd renew-replication-certificate commands' commands "$@" +} +(( $+functions[_kanidmd__server_commands] )) || +_kanidmd__server_commands() { + local commands; commands=() + _describe -t commands 'kanidmd server commands' commands "$@" +} +(( $+functions[_kanidmd__show-replication-certificate_commands] )) || +_kanidmd__show-replication-certificate_commands() { + local commands; commands=() + _describe -t commands 'kanidmd show-replication-certificate commands' commands "$@" +} +(( $+functions[_kanidmd__version_commands] )) || +_kanidmd__version_commands() { + local commands; commands=() + _describe -t commands 'kanidmd version commands' commands "$@" +} + +if [ "$funcstack[1]" = "_kanidmd" ]; then + _kanidmd "$@" +else + compdef _kanidmd kanidmd +fi diff --git a/net-nds/kanidmd/kanidmd-1.8.5-r1.ebuild b/net-nds/kanidmd/kanidmd-1.8.5-r1.ebuild index a647ada..bdc76d6 100644 --- a/net-nds/kanidmd/kanidmd-1.8.5-r1.ebuild +++ b/net-nds/kanidmd/kanidmd-1.8.5-r1.ebuild @@ -763,7 +763,7 @@ CRATES=" zxcvbn@3.1.0 " -inherit cargo +inherit cargo shell-completion systemd DESCRIPTION="Kanidm Server Daemon" HOMEPAGE="https://github.com/kanidm/kanidm/" @@ -792,6 +792,7 @@ pam? ( sys-libs/pam ) " BDEPEND=" llvm-core/clang + sys-devel/binutils >=dev-lang/rust-bin-1.90.0 " @@ -829,30 +830,32 @@ src_install() { newins examples/radius_full.toml radius.toml newins examples/unixd unixd + newbashcomp ${FILESDIR}/${PN}.bash ${PN} + newfishcomp ${FILESDIR}/${PN}.fish ${PN}.fish + newzshcomp ${FILESDIR}/${PN}.bash _${PN} + if use server; then einfo "Installing kanidmd-server" newins examples/server.toml server.toml - dodir /usr/share/kanidm - cp -R "${S}/server/core/static" "${ED}/usr/share/kanidm/" || die "Install failed!" + dodir /usr/share/kanidm/ui/hpkg + cp -R "${S}/server/core/static" "${ED}/usr/share/kanidm/ui/hpkg/" || die "Install failed!" - systemd_newunit platform/opensuse/kanidm-ipa-sync.service kanidm-ipa-sync.service - systemd_newunit platform/opensuse/kanidm-unixd-tasks.service kanidm-unixd-tasks.service - systemd_newunit platform/opensuse/kanidm-unixd.service kanidm-unixd.service - systemd_newunit platform/opensuse/kanidmd.service kanidmd.service + systemd_dounit platform/opensuse/kanidm-ipa-sync.service + systemd_dounit platform/opensuse/kanidm-unixd-tasks.service + systemd_dounit platform/opensuse/kanidm-unixd.service + systemd_dounit platform/opensuse/kanidmd.service newinitd "${FILESDIR}/kanidm.initd" kanidmd - - cp examples/server.toml "${ED}/usr/share/kanidm/" || die "Install failed!" fi if use acct; then - fowners root:kanidmd /etc/kanidm/{,config,radius.toml,unixd} + fowners root:kanidm /etc/kanidm/{,config,radius.toml,unixd} fperms g+w,o-rwx /etc/kanidm/{,config,radius.toml,unixd} if use server; then - fowners root:kanidmd /etc/kanidm/server.toml + fowners root:kanidm /etc/kanidm/server.toml fperms g+w,o-rwx /etc/kanidm/server.toml - diropts -m0750 -o kanidmd -g kanidmd + diropts -m0750 -o kanidm -g kanidm keepdir /var/lib/private/kanidm keepdir /var/log/kanidmd fi