浏览代码

first attempt to fix CI errors

nytral 7 年之前
父节点
当前提交
3bc59a0327
共有 1 个文件被更改,包括 10 次插入10 次删除
  1. 10 10
      dnsapi/dns_me.sh

+ 10 - 10
dnsapi/dns_me.sh

@@ -43,17 +43,17 @@ dns_me_add() {
     return 1
   fi
 
-#    _info "Adding record"
-    if _me_rest POST "$_domain_id/records/" "{\"type\":\"TXT\",\"name\":\"$_sub_domain\",\"value\":\"$txtvalue\",\"gtdLocation\":\"DEFAULT\",\"ttl\":120}"; then
-      if printf -- "%s" "$response" | grep \"id\": >/dev/null; then
-        _info "Added"
-        #todo: check if the record takes effect
-        return 0
-      else
-        _err "Add txt record error."
-        return 1
-      fi
+  _info "Adding record"
+  if _me_rest POST "$_domain_id/records/" "{\"type\":\"TXT\",\"name\":\"$_sub_domain\",\"value\":\"$txtvalue\",\"gtdLocation\":\"DEFAULT\",\"ttl\":120}"; then
+    if printf -- "%s" "$response" | grep \"id\": >/dev/null; then
+      _info "Added"
+      #todo: check if the record takes effect
+      return 0
+    else
+      _err "Add txt record error."
+      return 1
     fi
+  fi
 
 }