浏览代码

dns_ovh: fix random add/remove txt records failures

due to inconsistent curl api response json
Ivanovitch_k 4 年之前
父节点
当前提交
63165764dc
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      dnsapi/dns_ovh.sh

+ 3 - 1
dnsapi/dns_ovh.sh

@@ -261,7 +261,9 @@ _get_root() {
       return 1
     fi
 
-    if ! _contains "$response" "This service does not exist" >/dev/null && ! _contains "$response" "NOT_GRANTED_CALL" >/dev/null; then
+    if ! _contains "$response" "This service does not exist" >/dev/null && \
+       ! _contains "$response" "This call has not been granted" >/dev/null && \
+       ! _contains "$response" "NOT_GRANTED_CALL" >/dev/null; then
       _sub_domain=$(printf "%s" "$domain" | cut -d . -f 1-$p)
       _domain="$h"
       return 0