0908
This commit is contained in:
20
acme/renew.sh
Normal file
20
acme/renew.sh
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/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')] 续签检查完成"
|
||||
Reference in New Issue
Block a user