fix executable checks

This commit is contained in:
2026-08-22 05:37:25 +02:00
parent bfa15561d8
commit 127fb83567
+2 -2
View File
@@ -34,7 +34,7 @@ EOF
function full_usage() { function full_usage() {
usage true usage true
[ ! -e "$PBC" ] && echo "Error: $PBC is not executable!" >&2 && return 254 [ ! -x "$PBC" ] && echo "Error: $PBC is not executable!" >&2 && return 254
echo "Commands of proxmox-backup-client:" echo "Commands of proxmox-backup-client:"
echo echo
"$PBC" help | tail -n +3 "$PBC" help | tail -n +3
@@ -273,7 +273,7 @@ else
source "$cfgfile" || exit $? source "$cfgfile" || exit $?
PBC=${PBC:-/usr/local/bin/proxmox-backup-client} PBC=${PBC:-/usr/local/bin/proxmox-backup-client}
[ ! -f "$PBC" ] && echo "Error: $PBC: no such file" >&2 && exit 200 [ ! -f "$PBC" ] && echo "Error: $PBC: no such file" >&2 && exit 200
[ ! -e "$PBC" ] && echo "Error: $PBC: not executable" >&2 && exit 200 [ ! -x "$PBC" ] && echo "Error: $PBC: not executable" >&2 && exit 200
! command -v jq >/dev/null && echo "Error: jq executable not found!" >&2 && exit 200 ! command -v jq >/dev/null && echo "Error: jq executable not found!" >&2 && exit 200
fi fi