Parcourir la source

more specific delete of records

peter il y a 3 ans
Parent
commit
0c9a6da623
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      dnsapi/dns_curanet.sh

+ 1 - 1
dnsapi/dns_curanet.sh

@@ -82,7 +82,7 @@ dns_curanet_rm() {
     return 1
   fi
 
-  recordid=$(echo "$response" | _egrep_o "{\"id\":[0-9]+,\"name\":\"$fulldomain\"" | _egrep_o "id\":[0-9]+" | cut -c 5-)
+  recordid=$(echo "$response" | _egrep_o "{\"id\":[0-9]+,\"name\":\"$fulldomain\",\"type\":\"TXT\",\"ttl\":60,\"priority\":0,\"data\":\"..$txtvalue" | _egrep_o "id\":[0-9]+" | cut -c 5-)
   _debug "Deleting recordID $recordid"
   response="$(_post "" "$CURANET_REST_URL/${_domain}/Records/$recordid" "" "DELETE")"
   return 0