Browse Source

Update dns_czechia.sh

Fix _czechia_rel_host() structure
pull/6764/head
CZECHIA-COM 4 weeks ago
committed by neil
parent
commit
3a1250958a
  1. 36
      dnsapi/dns_czechia.sh

36
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"

Loading…
Cancel
Save