Files
vitfit-r2/V2/deploy/nginx/certbot-renew.sh
T
2026-06-13 08:03:45 -04:00

11 lines
398 B
Bash

#!/usr/bin/env bash
# Renew Let's Encrypt certificates and reload nginx only when a cert was renewed.
# Run via cron or systemd timer twice daily (certbot skips certs with >30 days left).
#
# Recommended cron entry (as root):
# 0 3,15 * * * /path/to/vitfit/deploy/nginx/certbot-renew.sh >> /var/log/certbot-renew.log 2>&1
set -euo pipefail
certbot renew --quiet --deploy-hook "nginx -s reload"