mirror of
https://codeberg.org/polyteknisk-radiogruppe/the_prg_server_configuration.git
synced 2026-06-13 18:28:55 +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
|
||||
if [ -f "${envFile}" ]; then
|
||||
echo "DEBUG: Sourcing environment file: ${envFile}" >&2
|
||||
# shellcheck disable=SC1090
|
||||
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
|
||||
|
||||
# Map env variables from the env file into auth_key/auth_email used by the upstream script
|
||||
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
|
||||
export auth_key="''${CLOUDFLARE_API_TOKEN:-}"
|
||||
export auth_key="''${CLOUDFLARE_API_TOKEN}"
|
||||
echo "DEBUG: Using CLOUDFLARE_API_TOKEN (length: ''${#auth_key})" >&2
|
||||
else
|
||||
echo "ERROR: No Cloudflare API token found in environment file" >&2
|
||||
echo "ERROR: Available variables: $(set | grep CLOUDFLARE || echo 'none')" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
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
|
||||
|
||||
# Export auth_method for the single-run script
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue