#!/bin/bash # agent_read.sh — READ-ONLY GETs to the agent local API, run ON the PVE host (token never leaves it) export LC_ALL=C B=/var/lib/felhom-agent/guests/9201/bootstrap/bootstrap.json TOK=$(python3 -c "import json;print(json.load(open('$B'))['local_api']['token'])") EP=$(python3 -c "import json;print(json.load(open('$B'))['local_api']['endpoint'])") for p in "$@"; do echo "=== GET $p"; curl -sS -k -m 30 -w '\nHTTP %{http_code}\n' -H "Authorization: Bearer $TOK" "https://$EP$p"; done