From ec7ed5c41cfc476848821e4325e154cdbfded148 Mon Sep 17 00:00:00 2001 From: wukun Date: Thu, 21 Mar 2019 10:52:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=94=AF=E6=8C=81=E5=90=8C?= =?UTF-8?q?=E5=9F=9F=E5=90=8D=E5=A4=9A=E8=AE=B0=E5=BD=95=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- update_aliyun_com.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/update_aliyun_com.sh b/update_aliyun_com.sh index 4f5ac88..55acda3 100644 --- a/update_aliyun_com.sh +++ b/update_aliyun_com.sh @@ -34,6 +34,17 @@ __SEPARATOR="&" [ "$domain" == "${domain/@/}" ] && domain="${domain/./@}" # 未找到分隔符,兼容常用域名格式 __HOST="${domain%%@*}" __DOMAIN="${domain#*@}" + +__DOMAIN_IDX=1 +if [ "$domain" != "${domain/|/}" ] +then + __DOMAIN_IDX="${__DOMAIN#*|}" + __DOMAIN="${__DOMAIN%%|*}" + write_log 7 "发现配置域名索引位:$__DOMAIN_IDX" +fi + +write_log 7 "当前域名索引位:$__DOMAIN_IDX" + [ -z "$__HOST" -o "$__HOST" == "$__DOMAIN" ] && __HOST="@" # 设置记录类型 @@ -206,7 +217,7 @@ describe_domain() { else json_select "DomainRecords" >/dev/null 2>&1 json_select "Record" >/dev/null 2>&1 - json_select 1 >/dev/null 2>&1 + json_select $__DOMAIN_IDX >/dev/null 2>&1 json_get_var value "Locked" [ $value -ne 0 ] && write_log 14 "解析记录被锁定" json_get_var __RECID "RecordId"