diff --git a/pbc b/pbc index 36f8ae2..5d08b45 100755 --- a/pbc +++ b/pbc @@ -38,8 +38,6 @@ function full_usage() { echo "Commands of proxmox-backup-client:" echo "$PBC" help | tail -n +3 - echo - return $? } function pbc-version() { @@ -205,6 +203,8 @@ PBC=$(command -v proxmox-backup-client) PBC_DOWNLOAD_URL='http://download.proxmox.com/debian/pbs-client/dists/trixie/main/binary-amd64' ETC_DIR="/etc/$SCRIPT" +FULL_HELP=false + action='' cfgfile="$ETC_DIR/config" args=() @@ -224,8 +224,7 @@ while [ -n "$1" ]; do exit 0 ;; -H|--full-help) - full_usage - exit 0 + FULL_HELP=true ;; -*) echo "Error: invalid option: $opt" >&2 @@ -261,6 +260,13 @@ while [ -n "$1" ]; do done +if $FULL_HELP; then + [ -f "$cfgfile" ] && source "$cfgfile" + PBC=${PBC:-/usr/local/bin/proxmox-backup-client} + full_usage + exit $? +fi + if [ "$action" == 'install' ]; then if [ -f "$cfgfile" ]; then source "$cfgfile" || exit $?