I forgor zone identifer :3

This commit is contained in:
Root User 2026-03-03 13:41:18 +01:00
parent e90d3d4ac4
commit fd00d43f91
Signed by: root
GPG key ID: 087F0A95E5766D72

View file

@ -636,6 +636,20 @@ in {
${pkgs.util-linux}/bin/logger -s "DDNS Updater: No record_name arg provided; using record_name env: '$record_name'"
fi
# If a zone id was passed as second argument, use it (wrapper now passes it)
if [ -n "$2" ]; then
zone_identifier="$2"
${pkgs.util-linux}/bin/logger -s "DDNS Updater: Using zone_identifier from arg: '$zone_identifier'"
else
${pkgs.util-linux}/bin/logger -s "DDNS Updater: No zone_identifier arg provided; using zone_identifier env: '$zone_identifier'"
fi
# Fail fast if we still don't have a zone identifier
if [ -z "$zone_identifier" ]; then
${pkgs.util-linux}/bin/logger -s "DDNS Updater: zone_identifier is empty cannot proceed (invalid zone)."
exit 2
fi
###########################################
## Check and set the proper auth header
###########################################
@ -753,7 +767,7 @@ in {
export record_name="$r.${domain}"
fi
# Invoke the single-run script explicitly with the system's bash via env to avoid /bin/bash shebang issues
${pkgs.bash}/bin/bash /etc/cloudflare-ddns/update-single.sh "$record_name" || true
${pkgs.bash}/bin/bash /etc/cloudflare-ddns/update-single.sh "$record_name" "$zone_identifier" || true
done
'';