Skip to content

Instantly share code, notes, and snippets.

@siteshen
Created March 29, 2018 06:49
Show Gist options
  • Save siteshen/91f97ac04a974537cf9816da70339085 to your computer and use it in GitHub Desktop.
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
# 1 domain per line
# *ALL* domains use the same ssl certificate
my.domain1.com
my.domain2.com
#!/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