webhook-tools/scripts/tlsupdatev1
“xHuPo” ac6f3243ab firest
2024-08-05 14:31:56 +08:00
..
config.yaml firest 2024-08-05 14:31:56 +08:00
consts.go firest 2024-08-05 14:31:56 +08:00
go.mod firest 2024-08-05 14:31:56 +08:00
go.sum firest 2024-08-05 14:31:56 +08:00
main.go firest 2024-08-05 14:31:56 +08:00
Readme.md firest 2024-08-05 14:31:56 +08:00

安装acme.sh并使用dns方式生成证书

# 安装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]'"