From fcc70d789aca7c9f31fd924a8d1d68f352460124 Mon Sep 17 00:00:00 2001 From: Christine Elisabeth Koppel Date: Tue, 3 Mar 2026 14:49:16 +0100 Subject: [PATCH] More fixes... --- nix-system-configs/modules/system/traefik.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nix-system-configs/modules/system/traefik.nix b/nix-system-configs/modules/system/traefik.nix index ed097f9..ad8099c 100644 --- a/nix-system-configs/modules/system/traefik.nix +++ b/nix-system-configs/modules/system/traefik.nix @@ -706,7 +706,7 @@ in { ########################################### ## Get existing IP ########################################### - old_ip=$(echo "$record" | sed -E 's/.*"content":"(([0-9]{1,3}\\.){3}[0-9]{1,3})".*/\\1/') + old_ip=$(echo "$record" | ${pkgs.jq}/bin/jq -r '.result[0].content') # Compare if they're the same if [[ $CURRENT_IP == $old_ip ]]; then ${pkgs.util-linux}/bin/logger "DDNS Updater: IP ($CURRENT_IP) for ''${record_name} has not changed." @@ -719,7 +719,7 @@ in { ########################################### ## Set the record identifier from result ########################################### - record_identifier=$(echo "$record" | sed -E 's/.*"id":"([A-Za-z0-9_]+)".*/\\1/') + record_identifier=$(echo "$record" | ${pkgs.jq}/bin/jq -r '.result[0].id') # Output for debugging ${pkgs.util-linux}/bin/logger -s "DDNS Updater: Record identifier for ''${record_name} is ''${record_identifier}"