Files
shell-scripts/0-部署应用/证书申请/证书申请模板.sh
2025-07-10 16:49:54 +08:00

20 lines
779 B
Bash

#!/bin/bash
curl -X GET "https://api.cloudflare.com/client/v4/user/tokens/verify" \
-H "Authorization: Bearer T7LxBemfe8SNGWkT9uz2XIc1e22ifAbBv_POJvDP" \
-H "Content-Type:application/json"
#export DOMAIN_NAME=chat.107421.xyz
export DOMAIN_NAME=push.107421.xyz
# 可以操作DNS的API Token
export CF_Token="oXJRP5XI8Zhipa_PtYtB_jy6qWL0I9BosrJEYE8p"
export CF_Account_ID="dfaadeb83406ef5ad35da02617af9191"
export CF_Zone_ID="511894a4f1357feb905e974e16241ebb"
acme.sh --issue --dns dns_cf -d ${DOMAIN_NAME} --keylength ec-256
acme.sh --install-cert -d ${DOMAIN_NAME} --ecc \
--key-file /etc/nginx/conf.d/ssl_key/${DOMAIN_NAME}.key.pem \
--fullchain-file /etc/nginx/conf.d/ssl_key/${DOMAIN_NAME}.cert.pem \
--reloadcmd "systemctl restart nginx --force"