Fix syntax issues in DDNS

This commit is contained in:
Root User 2026-03-03 13:26:18 +01:00
parent afe8d51b75
commit 4ae50e0d91
Signed by: root
GPG key ID: 087F0A95E5766D72

View file

@ -650,9 +650,9 @@ in {
########################################### ###########################################
${pkgs.util-linux}/bin/logger "DDNS Updater: Check Initiated" ${pkgs.util-linux}/bin/logger "DDNS Updater: Check Initiated"
record=$(${pkgs.curl}/bin/curl -s -X GET "https://api.cloudflare.com/client/v4/zones/''${zone_identifier}/dns_records?type=A&name=''${record_name}" \ record=$(${pkgs.curl}/bin/curl -s -X GET "https://api.cloudflare.com/client/v4/zones/''$zone_identifier/dns_records?type=A&name=''$record_name" \
-H "X-Auth-Email: ''${auth_email}" \ -H "X-Auth-Email: ''$auth_email" \
-H "''${auth_header} ''${auth_key}" \ -H "''$auth_header ''$auth_key" \
-H "Content-Type: application/json") -H "Content-Type: application/json")
########################################### ###########################################
@ -681,11 +681,11 @@ in {
########################################### ###########################################
## Change the IP@Cloudflare using the API ## Change the IP@Cloudflare using the API
########################################### ###########################################
update=$(${pkgs.curl}/bin/curl -s -X PATCH "https://api.cloudflare.com/client/v4/zones/''${zone_identifier}/dns_records/''${record_identifier}" \ update=$(q${pkgs.curl}/bin/curl -s -X PATCH "https://api.cloudflare.com/client/v4/zones/''$zone_identifier/dns_records/''$record_identifier" \
-H "X-Auth-Email: ''${auth_email}" \ -H "X-Auth-Email: ''$auth_email" \
-H "''${auth_header} ''${auth_key}" \ -H "''$auth_header ''$auth_key" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
--data "{\"type\":\"A\",\"name\":\"''${record_name}\",\"content\":\"''${CURRENT_IP}\",\"ttl\":''${ttl},\"proxied\":''${proxy}}") --data "{\"type\":\"A\",\"name\":\"''$record_name\",\"content\":\"''$CURRENT_IP\",\"ttl\":''$ttl,\"proxied\":''${proxy}}")
########################################### ###########################################
## Report the status (simplified payload construction to avoid nested-quote issues) ## Report the status (simplified payload construction to avoid nested-quote issues)