11 lines
398 B
Bash
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"
|