Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
tbblgm119
lede
提交
3c67adbb
L
lede
项目概览
tbblgm119
/
lede
与 Fork 源项目一致
从无法访问的项目Fork
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
lede
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3c67adbb
编写于
4月 19, 2019
作者:
C
coolsnowwolf
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ddns-scripts_aliyun: support update IPv6 AAAA record at the same FQDN
上级
bcbe4750
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
29 addition
and
16 deletion
+29
-16
package/lean/ddns-scripts_aliyun/Makefile
package/lean/ddns-scripts_aliyun/Makefile
+1
-1
package/lean/ddns-scripts_aliyun/update_aliyun_com.sh
package/lean/ddns-scripts_aliyun/update_aliyun_com.sh
+28
-15
未找到文件。
package/lean/ddns-scripts_aliyun/Makefile
浏览文件 @
3c67adbb
...
...
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME
:=
ddns-scripts_aliyun
PKG_VERSION
:=
1.0.0
PKG_RELEASE
:=
1
PKG_RELEASE
:=
2
PKG_LICENSE
:=
GPLv2
PKG_MAINTAINER
:=
Sense <sensec@gmail.com>
...
...
package/lean/ddns-scripts_aliyun/update_aliyun_com.sh
浏览文件 @
3c67adbb
...
...
@@ -196,26 +196,39 @@ enable_domain() {
# 获取子域名解析记录列表
describe_domain
()
{
local
value
typ
e
;
local
ret
=
0
local
count valu
e
;
local
ret
=
0
aliyun_transfer
"Action=DescribeSubDomainRecords"
"SubDomain=
${
__HOST
}
.
${
__DOMAIN
}
"
||
write_log 14
"服务器通信失败"
write_log 7
"获取到解析记录:
$(
cat
"
$DATFILE
"
2> /dev/null
)
"
json_cleanup
;
json_load
"
$(
cat
"
$DATFILE
"
2> /dev/null
)
"
>
/dev/null 2>&1
json_get_var
value
"TotalCount"
if
[
$
value
-eq
0
]
;
then
json_get_var
count
"TotalCount"
if
[
$
count
-eq
0
]
;
then
write_log 7
"解析记录不存在"
ret
=
1
else
json_select
"DomainRecords"
>
/dev/null 2>&1
json_select
"Record"
>
/dev/null 2>&1
json_select 1
>
/dev/null 2>&1
json_get_var value
"Locked"
[
$value
-ne
0
]
&&
write_log 14
"解析记录被锁定"
json_get_var __RECID
"RecordId"
write_log 7
"获得解析记录ID:
${
__RECID
}
"
json_get_var value
"Status"
[
"
$value
"
!=
"ENABLE"
]
&&
ret
=
$((
$ret
|
2
))
&&
write_log 7
"解析记录被禁用"
json_get_var
type
"Type"
json_get_var value
"Value"
[
"
$type
"
!=
"
${
__TYPE
}
"
-o
"
$value
"
!=
"
${
__IP
}
"
]
&&
ret
=
$((
$ret
|
4
))
&&
write_log 7
"地址或类型需要修改"
local
i
=
1
;
while
[
$i
-le
$count
]
;
do
json_cleanup
;
json_load
"
$(
cat
"
$DATFILE
"
2> /dev/null
)
"
>
/dev/null 2>&1
json_select
"DomainRecords"
>
/dev/null 2>&1
json_select
"Record"
>
/dev/null 2>&1
json_select
$i
>
/dev/null 2>&1
i
=
$((
$i
+
1
))
json_get_var value
"Type"
if
[
"
$value
"
!=
"
${
__TYPE
}
"
]
;
then
write_log 7
"当前解析类型:
${
__TYPE
}
, 获得不匹配类型:
$value
"
ret
=
1
;
continue
else
ret
=
0
json_get_var __RECID
"RecordId"
write_log 7
"获得解析记录ID:
${
__RECID
}
, 类型:
$value
"
json_get_var value
"Locked"
[
$value
-ne
0
]
&&
write_log 14
"解析记录被锁定"
json_get_var value
"Status"
[
"
$value
"
!=
"ENABLE"
]
&&
ret
=
$((
$ret
|
2
))
&&
write_log 7
"解析记录被禁用"
json_get_var value
"Value"
[
"
$value
"
!=
"
${
__IP
}
"
]
&&
ret
=
$((
$ret
|
4
))
&&
write_log 7
"地址需要修改"
break
fi
done
fi
return
$ret
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录