oneuptime/certs-renew.sh
Simon Larsen f948a32669
fix paths
2022-12-16 20:20:44 +05:30

8 lines
359 B
Bash

# Run this cron every day to see if the cert needs renewal.
export $(grep -v '^#' config.env | xargs)
npm run prerun
docker compose nginx stop
sudo certbot renew
sudo cp /etc/letsencrypt/live/$DOMAIN/fullchain.pem $(pwd)/Certs/ServerCerts/Cert.crt
sudo cp /etc/letsencrypt/live/$DOMAIN/privkey.pem $(pwd)/Certs/ServerCerts/Key.key
docker compose start nginx