Files
common-server-public/acme/renew.sh
张威33321 a9ec40a289 0908
2026-09-09 15:04:54 +08:00

21 lines
621 B
Bash
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.
#!/usr/bin/env bash
#
# 手动触发一次续签检查。
#
# acme.sh 安装时已经自动写入了 cron每天 ~/.acme.sh/acme.sh --cron
# 正常情况下不需要手动执行,这个脚本只是方便排查和立即验证。
# 续签成功时 acme.sh 会自动执行 issue.sh 里登记的 --reloadcmd。
#
set -euo pipefail
ACME="${ACME:-$HOME/.acme.sh/acme.sh}"
if [ ! -s "$ACME" ]; then
echo "未找到 acme.sh请先执行本目录下的 install.sh" >&2
exit 1
fi
echo "[$(date '+%Y-%m-%d %H:%M:%S')] 开始续签检查"
"$ACME" --cron
echo "[$(date '+%Y-%m-%d %H:%M:%S')] 续签检查完成"