]> git.proxmox.com Git - mirror_acme.sh.git/commitdiff
fix https://github.com/acmesh-official/acme.sh/issues/2888
authorneil <github@byneil.com>
Wed, 29 Apr 2020 02:42:17 +0000 (10:42 +0800)
committerneil <github@byneil.com>
Wed, 29 Apr 2020 02:42:17 +0000 (10:42 +0800)
dnsapi/dns_cf.sh

index b4e9f6322bf0ecc81995e0c5b7c0735d81b6ce27..36799dcd9ae34caf3e5fa1152d4839541e6bda51 100755 (executable)
@@ -130,7 +130,7 @@ dns_cf_rm() {
       _err "Delete record error."
       return 1
     fi
-    _contains "$response" '"success":true'
+    echo "$response" | tr -d " " | grep \"success\":true >/dev/null
   fi
 
 }
@@ -151,7 +151,7 @@ _get_root() {
     if ! _cf_rest GET "zones/$CF_Zone_ID"; then
       return 1
     else
-      if _contains "$response" '"success":true'; then
+      if echo "$response" | tr -d " " | grep \"success\":true >/dev/null; then
         _domain=$(echo "$response" | _egrep_o "\"name\": *\"[^\"]*\"" | cut -d : -f 2 | tr -d \" | _head_n 1 | tr -d " ")
         if [ "$_domain" ]; then
           _cutlength=$((${#domain} - ${#_domain} - 1))