stop trying to print the public frontend endpoint for private shares

This commit is contained in:
Kenneth Bingham 2024-11-29 23:33:03 -05:00
parent 14e3fa1836
commit d780ce43b7
No known key found for this signature in database
GPG Key ID: 31709281860130B6

View File

@ -217,6 +217,7 @@ else
echo "ERROR: invalid JSON in $(realpath ~/.zrok)/reserved.json" >&2 echo "ERROR: invalid JSON in $(realpath ~/.zrok)/reserved.json" >&2
exit 1 exit 1
else else
if [[ "${ZROK_FRONTEND_MODE:-}" == reserved-public ]]; then
ZROK_PUBLIC_URLS=$(jq -cr '.frontend_endpoints' ~/.zrok/reserved.json 2>/dev/null) ZROK_PUBLIC_URLS=$(jq -cr '.frontend_endpoints' ~/.zrok/reserved.json 2>/dev/null)
if [[ -z "${ZROK_PUBLIC_URLS}" || "${ZROK_PUBLIC_URLS}" == null ]]; then if [[ -z "${ZROK_PUBLIC_URLS}" || "${ZROK_PUBLIC_URLS}" == null ]]; then
echo "ERROR: frontend endpoints not defined in $(realpath ~/.zrok)/reserved.json" >&2 echo "ERROR: frontend endpoints not defined in $(realpath ~/.zrok)/reserved.json" >&2
@ -224,6 +225,7 @@ else
else else
echo "INFO: zrok public URLs: ${ZROK_PUBLIC_URLS}" echo "INFO: zrok public URLs: ${ZROK_PUBLIC_URLS}"
fi fi
fi
ZROK_RESERVED_TOKEN=$(jq -r '.token' ~/.zrok/reserved.json 2>/dev/null) ZROK_RESERVED_TOKEN=$(jq -r '.token' ~/.zrok/reserved.json 2>/dev/null)
if [[ -z "${ZROK_RESERVED_TOKEN}" || "${ZROK_RESERVED_TOKEN}" == null ]]; then if [[ -z "${ZROK_RESERVED_TOKEN}" || "${ZROK_RESERVED_TOKEN}" == null ]]; then
echo "ERROR: zrok reservation token not defined in $(realpath ~/.zrok)/reserved.json" >&2 echo "ERROR: zrok reservation token not defined in $(realpath ~/.zrok)/reserved.json" >&2