From 6b2847fec7230dbfd108a2c4317d047d3aa3ce4f2fda09724d4df2ac175c278e Mon Sep 17 00:00:00 2001 From: Thomas Oettli Date: Sat, 22 Aug 2026 05:46:16 +0200 Subject: [PATCH] make full_usage aware of possible PBC setting in config --- pbc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) 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 $?