Browse Source

pick first entry if more than one TXT entry exists

DerVerruckteFuchs 4 years ago
parent
commit
b910726c43
1 changed files with 1 additions and 1 deletions
  1. 1 1
      dnsapi/dns_1984hosting.sh

+ 1 - 1
dnsapi/dns_1984hosting.sh

@@ -103,7 +103,7 @@ dns_1984hosting_rm() {
 
 
   _htmlget "$url/$_zone_id" "$_sub_domain"
   _htmlget "$url/$_zone_id" "$_sub_domain"
   _debug2 _response "$_response"
   _debug2 _response "$_response"
-  entry_id="$(echo "$_response" | _egrep_o 'entry_[0-9]+' | sed 's/entry_//')"
+  entry_id="$(echo "$_response" | _egrep_o 'entry_[0-9]+' | sed 's/entry_//' | _head_n 1)"
   _debug2 entry_id "$entry_id"
   _debug2 entry_id "$entry_id"
   if [ -z "$entry_id" ]; then
   if [ -z "$entry_id" ]; then
     _err "Error getting TXT entry_id for $1"
     _err "Error getting TXT entry_id for $1"