浏览代码

fix https://github.com/Neilpang/acme.sh/issues/1364#issuecomment-458035330

neilpang 6 年之前
父节点
当前提交
a964646803
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      dnsapi/dns_dp.sh

+ 1 - 1
dnsapi/dns_dp.sh

@@ -63,7 +63,7 @@ dns_dp_rm() {
     return 0
     return 0
   fi
   fi
 
 
-  record_id=$(echo "$response" | _egrep_o '{[^{]*"value":"'"$txtvalue"'"' | cut -d , -f 1 | cut -d : -f 2 | tr -d \")
+  record_id=$(echo "$response" | tr "{" "\n" | grep "$txtvalue" | grep '^"id"' | cut -d : -f 2 | cut -d '"' -f 2)
   _debug record_id "$record_id"
   _debug record_id "$record_id"
   if [ -z "$record_id" ]; then
   if [ -z "$record_id" ]; then
     _err "Can not get record id."
     _err "Can not get record id."