root账户下新建ssl.sh文件,内容为:#!/bin/bash export Tencent_SecretId="Your SectetID" export Tencent_SecretKey="Your SecretKey" acme.sh --issue --dns dns_tencent -d forgray.fun -d "*.forgray.fun" acme.sh --install-cert -d forgray.fun --key-file /etc/letsencrypt/live/forgray.fun/privkey.pem --fullchain-file /etc/letsencrypt/live/forgray.fun/fullchain.pem --reloadcmd "systemctl restart nginx"
保存并使用chmod +x ssl.sh 命令为该文件添加可执行权限后使用./ssl.sh命令运行即可。