From 4ae50e0d91ac3a2d1dd940d0776fb211f68f4559 Mon Sep 17 00:00:00 2001 From: Christine Elisabeth Koppel Date: Tue, 3 Mar 2026 13:26:18 +0100 Subject: [PATCH] Fix syntax issues in DDNS --- nix-system-configs/modules/system/traefik.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/nix-system-configs/modules/system/traefik.nix b/nix-system-configs/modules/system/traefik.nix index 1ce1d16..71750fc 100644 --- a/nix-system-configs/modules/system/traefik.nix +++ b/nix-system-configs/modules/system/traefik.nix @@ -650,9 +650,9 @@ in { ########################################### ${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}" \ - -H "X-Auth-Email: ''${auth_email}" \ - -H "''${auth_header} ''${auth_key}" \ + 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 "''$auth_header ''$auth_key" \ -H "Content-Type: application/json") ########################################### @@ -681,11 +681,11 @@ in { ########################################### ## 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}" \ - -H "X-Auth-Email: ''${auth_email}" \ - -H "''${auth_header} ''${auth_key}" \ + 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 "''$auth_header ''$auth_key" \ -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)