acme.sh
acme.sh copied to clipboard
Make `AWS_HOST` and `Region` configurable, which fixes issue #2722.
I make AWS_HOST
and Region
configurable with environment variables.
You can now use acme.sh with AWS China using the following command.
AWS_HOST=api.route53.cn Region=cn-northwest-1 ./acme.sh --issue ...
请问这项修改有没有需要调整的部份?
AWS_HOST 和 Region 需要 成为像 AWS_ACCESS_KEY_ID 一样的变量. 一样的读取, 一样的保存. 像你这种改法, 是没办法自动 renew 的. 因为 renew 时, 没人去定义AWS_HOST 变量, 又会使用默认值了.
了解,我目前對 AWS_HOST
和 Region
初步想到的逻辑是这样子:
if AWS_HOST environment variable is defined:
if AWS_HOST does not exist in config:
write AWS_HOST to config
set AWS_HOST as ${AWS_HOST}
else:
if AWS_HOST exists in config:
set AWS_HOST as config's AWS_HOST value
else:
write "route53.amazon.com" to config
set AWS_HOST as "route53.amazon.com"
有空我再来实现。
感谢你的提示。
没这么复杂. 照着 AWS_ACCESS_KEY_ID 写就可以了.
咦~ 可是 AWS_HOST
和 Region
都有预设值(分别是 route53.amazonaws.com
与 us-east-1
),这个特性跟 AWS_ACCESS_KEY_ID
不同,为什么说可以照 AWS_ACCESS_KEY_ID
的逻辑写就好呢?