rfancn / aliyun-ddns-client

Python DDNS client for Aliyun
402 stars 137 forks source link

目前子域名只能填写一个,希望能填写一个数组,并且可以同时更新数组内的组域名。 #24

Open snowdream opened 6 years ago

snowdream commented 6 years ago

目前子域名只能填写一个,希望能填写一个数组,并且可以同时更新数组内的组域名。

# subdomain name, like www, blog, bbs, *, @, ...
sub_domain=
rfancn commented 6 years ago

这个是设计在配置文件里面写多个section来实现:

[DomainRecord1]
domain= test.com
# subdomain name, like www, blog, bbs, *, @, ...
sub_domain= www
# resolve type, 'A', 'AAAA'..., currently it only supports 'A'
type=A

[DomainRecord2]
domain= test.com
# subdomain name, like www, blog, bbs, *, @, ...
sub_domain= bbs
# resolve type, 'A', 'AAAA'..., currently it only supports 'A'
type=A
...
snowdream commented 6 years ago

建议section调整为支持多域名,而sub_domain调整为支持多子域名。@rfancn

BerdyPango commented 6 years ago

同样的问题,建议 sub_domain 可以支持数组,这样在一级域名相同的情况下不需要重复 Section 的其余配置。

zcq100 commented 5 years ago

可以通过指定启动参数,加载不同的配置文件,来实现多域名。 systemctl enable ddns@doamain1.timer 这样更灵活,还能修改不同aliyun账号下的域名。