浏览代码

fix for existing record

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

+ 1 - 1
dnsapi/dns_selectel.sh

@@ -36,7 +36,7 @@ dns_selectel_add() {
 
   _info "Adding record"
   if _sl_rest POST "/$_domain_id/records/" "{\"type\": \"TXT\", \"ttl\": 60, \"name\": \"$fulldomain\", \"content\": \"$txtvalue\"}"; then
-    if _contains "$response" "$txtvalue"; then
+    if _contains "$response" "$txtvalue" || _contains "$response" "record_already_exists"; then
       _info "Added, OK"
       return 0
     fi