Browse Source

Fix: Make record_id extraction independent of JSON key order

pull/5214/head
WhiteAls 5 months ago
parent
commit
2f1ca949f0
  1. 4
      dnsapi/dns_yandex360.sh

4
dnsapi/dns_yandex360.sh

@ -75,7 +75,9 @@ dns_yandex360_rm() {
record_id=$(
echo "$response" |
sed -En 's/.*"recordId":([0-9]+).*"text":"'"${txtvalue}"'".*$/\1/p'
_egrep_o '\{[^}]*'"${txtvalue}"'[^}]*\}' |
_egrep_o '"recordId":[0-9]*' |
cut -d':' -f2
)
if [ -z "$record_id" ]; then

Loading…
Cancel
Save