This commit is contained in:
张威33321
2026-09-08 20:36:17 +08:00
parent 58d65188a1
commit fb87be680d
19 changed files with 398 additions and 212 deletions

View File

@@ -1,7 +1,10 @@
# Let's Encrypt 自动续签 cron 配置
# 每天凌晨 2 点执行续签检查
# 编辑crontab -e
#
# 注意cron 的 PATH 极简,务必用 bash <绝对路径> 调用(脚本内部也会自行补齐 PATH
# 编辑 crontab: crontab -e
# 添加以下行:
# 续签LE 官方建议一天两次
0 2,15 * * * bash /home/awei/workspace/common-server-public/certbot/renew-cert.sh >> /var/log/certbot-renew.log 2>&1
0 2 * * * cd /home/awei/workspace/common-server-public/certbot && ./renew-cert.sh >> /var/log/certbot-renew.log 2>&1
# 有效期检查:低于 20 天时脚本以非 0 退出,可配合告警
0 8 * * * bash /home/awei/workspace/common-server-public/certbot/check-cert.sh >> /var/log/certbot-check.log 2>&1