mirror of
https://codeberg.org/polyteknisk-radiogruppe/the_prg_server_configuration.git
synced 2026-06-14 02:38:58 +02:00
More debugs.
This commit is contained in:
parent
0d02578ab3
commit
40f5a99e1f
1 changed files with 14 additions and 3 deletions
|
|
@ -768,22 +768,33 @@ in {
|
||||||
|
|
||||||
# Wrapper: source env, map tokens, loop declared records and call the upstream single-run script
|
# Wrapper: source env, map tokens, loop declared records and call the upstream single-run script
|
||||||
if [ -f "${envFile}" ]; then
|
if [ -f "${envFile}" ]; then
|
||||||
|
echo "DEBUG: Sourcing environment file: ${envFile}" >&2
|
||||||
# shellcheck disable=SC1090
|
# shellcheck disable=SC1090
|
||||||
source "${envFile}"
|
source "${envFile}"
|
||||||
|
echo "DEBUG: After sourcing - CLOUDFLARE_DNS_API_TOKEN length: ''${#CLOUDFLARE_DNS_API_TOKEN:-0}, CLOUDFLARE_API_TOKEN length: ''${#CLOUDFLARE_API_TOKEN:-0}" >&2
|
||||||
|
else
|
||||||
|
echo "ERROR: Environment file not found: ${envFile}" >&2
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Map env variables from the env file into auth_key/auth_email used by the upstream script
|
# Map env variables from the env file into auth_key/auth_email used by the upstream script
|
||||||
if [ -n "''${CLOUDFLARE_DNS_API_TOKEN:-}" ]; then
|
if [ -n "''${CLOUDFLARE_DNS_API_TOKEN:-}" ]; then
|
||||||
export auth_key="''${CLOUDFLARE_DNS_API_TOKEN:-}"
|
export auth_key="''${CLOUDFLARE_DNS_API_TOKEN}"
|
||||||
|
echo "DEBUG: Using CLOUDFLARE_DNS_API_TOKEN (length: ''${#auth_key})" >&2
|
||||||
elif [ -n "''${CLOUDFLARE_API_TOKEN:-}" ]; then
|
elif [ -n "''${CLOUDFLARE_API_TOKEN:-}" ]; then
|
||||||
export auth_key="''${CLOUDFLARE_API_TOKEN:-}"
|
export auth_key="''${CLOUDFLARE_API_TOKEN}"
|
||||||
|
echo "DEBUG: Using CLOUDFLARE_API_TOKEN (length: ''${#auth_key})" >&2
|
||||||
else
|
else
|
||||||
echo "ERROR: No Cloudflare API token found in environment file" >&2
|
echo "ERROR: No Cloudflare API token found in environment file" >&2
|
||||||
|
echo "ERROR: Available variables: $(set | grep CLOUDFLARE || echo 'none')" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "''${CLOUDFLARE_USERNAME:-}" ]; then
|
if [ -n "''${CLOUDFLARE_USERNAME:-}" ]; then
|
||||||
export auth_email="''${CLOUDFLARE_USERNAME:-}"
|
export auth_email="''${CLOUDFLARE_USERNAME}"
|
||||||
|
echo "DEBUG: Using CLOUDFLARE_USERNAME: '$auth_email'" >&2
|
||||||
|
else
|
||||||
|
echo "DEBUG: No CLOUDFLARE_USERNAME found, auth_email will be empty" >&2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Export auth_method for the single-run script
|
# Export auth_method for the single-run script
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue