Created
March 29, 2018 06:49
-
-
Save siteshen/91f97ac04a974537cf9816da70339085 to your computer and use it in GitHub Desktop.
How to use letsencrypt.org in qiniu storage service with https://github.com/Neilpang/acme.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 1 domain per line | |
| # *ALL* domains use the same ssl certificate | |
| my.domain1.com | |
| my.domain2.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # export CX_Key="" CX_Secret="" | |
| install_acme() { | |
| [ -f ~/.acme.sh/acme.sh ] || curl https://get.acme.sh | sh | |
| } | |
| issue_ssl() { | |
| keyfile=output/cert.key | |
| echo "正在生成证书..." | |
| ~/.acme.sh/acme.sh --issue --dns dns_cx $(cat domains.txt | grep -v '^#' | sed -e 's/^/-d /g') --dnssleep 3 --key-file $keyfile | |
| echo "请在打开的浏览器,上传刚刚生成的证书" | |
| echo "open https://portal.qiniu.com/certificate/ssl#cert" | |
| for domain in $(cat domains.txt | grep -v '^#' | head -1); do | |
| echo "HTTPS 配置 -> 修改配置 -> 选择刚刚上传的证书" | |
| # open https://portal.qiniu.com/cdn/domain/${domain} | |
| done | |
| } | |
| install_acme | |
| issue_ssl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment