webhook-tools/scripts/tlsupdatev1/Readme.md
“xHuPo” ac6f3243ab firest
2024-08-05 14:31:56 +08:00

23 lines
919 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## 安装acme.sh并使用dns方式生成证书
```shell
# 安装acme.sh
curl https://get.acme.sh | sh -s email="xxx@xxx.com"
# 使用dns方式生成证书
cat >> ~/.bashrc << EOF
# Username与DomainName在相应iam账号的我的凭证中获取
export HUAWEICLOUD_Username="dns" # 华为云iam账号
export HUAWEICLOUD_Password="xxxx" # 华为云iam密码
export HUAWEICLOUD_DomainName="turingsynergy" # 华为云账号
EOF
source ~/.bashrc
## 生成证书
acme.sh --issue -d turingsynergy.com -d *.turingsynergy.com --dns dns_huaweicloud
## 安装证书
## 替换[]为证书id
acme.sh --install-cert -d turingsynergy.com \
--key-file /opt/webhook/scripts/tlsupdatev1/ssl//turingsynergy.com.key \
--fullchain-file /opt/webhook/scripts/tlsupdatev1/ssl//turingsynergy.com.pem \
--reloadcmd "curl 'https//webhook-ops.shasoapp.com/hooks/tlsupdate?action=upadte&&id=[华为云中配置的证书id]'"
```