From 3a1250958a6cd9a0aed28352a7a0bdc9aa89dffc Mon Sep 17 00:00:00 2001 From: CZECHIA-COM Date: Mon, 23 Feb 2026 15:46:39 +0100 Subject: [PATCH] Update dns_czechia.sh Fix _czechia_rel_host() structure --- dnsapi/dns_czechia.sh | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/dnsapi/dns_czechia.sh b/dnsapi/dns_czechia.sh index ac6d435e..80994004 100644 --- a/dnsapi/dns_czechia.sh +++ b/dnsapi/dns_czechia.sh @@ -142,10 +142,10 @@ _czechia_pick_zone() { if [ -n "$CZ_Zone" ]; then z="$CZ_Zone" case "$fd" in - "$z" | *".$z") - best="$z" - bestlen=${#z} - ;; + "$z" | *".$z") + best="$z" + bestlen=${#z} + ;; esac fi @@ -157,12 +157,12 @@ _czechia_pick_zone() { z="$(printf "%s" "$z" | sed 's/^ *//; s/ *$//; s/\.$//')" [ -z "$z" ] && continue case "$fd" in - "$z" | *".$z") - if [ "${#z}" -gt "$bestlen" ]; then - best="$z" - bestlen=${#z} - fi - ;; + "$z" | *".$z") + if [ "${#z}" -gt "$bestlen" ]; then + best="$z" + bestlen=${#z} + fi + ;; esac done IFS="$oldifs" @@ -194,18 +194,22 @@ _czechia_rel_host() { suffix=".$z" case "$fd" in - *"$suffix") - rel="${fd%"$suffix"}" - [ -z "$rel" ] && rel="@" - echo "$rel" - return 0 - ;; + *"$suffix") + rel="${fd%"$suffix"}" + [ -z "$rel" ] && rel="@" + echo "$rel" + return 0 + ;; esac _err "fulldomain '$fd' is not under zone '$z'" return 1 } + _err "fulldomain '$fd' is not under zone '$z'" + return 1 +} + _czechia_build_body() { host="$1" txt="$2"