tenantsync v1.0.0 live fix (client json is {data:[...]}-wrapped) + hub image bump 0.44.0

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PSK5g6qYLknKj8u3QAFEr6
This commit is contained in:
2026-07-10 20:59:55 +02:00
parent ce6a56691e
commit 32ca1f60a7
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -97,8 +97,10 @@ if ! proxmox-backup-manager user list --output-format json | jq -e --arg u "$PBS
proxmox-backup-manager user create "$PBS_USER" --comment 'offsite tenancy' >&2
log "created user $PBS_USER"
fi
# NOTE: the CLIENT wraps json output as {"data":[...]} (live-proven on ep0); the MANAGER commands
# return bare arrays. `(.data // .)` handles both.
if ! PBS_PASSWORD="$ADM" proxmox-backup-client namespace list --repository "$ADMIN_REPO" \
--output-format json | jq -e --arg ns "$CID" 'any(.[]; .ns == $ns)' >/dev/null; then
--output-format json | jq -e --arg ns "$CID" '(.data // .) | any(.[]; .ns == $ns)' >/dev/null; then
PBS_PASSWORD="$ADM" proxmox-backup-client namespace create "$CID" --repository "$ADMIN_REPO" >&2
log "created namespace $CID"
fi