auto reload nginx after letsencrypt cert updateFrom: Retro GuyNewsgroups:
Wed, 7 Apr 2021 00:21 UTC
View all headers
Getting tired of my sites saying the cert is expired even after it's auto-renewed. Every 90 days, each site does this until either I reload nginx or it happens automatically for some reason.
Note: This is for letsencrypt certs:
renew-hook has been deprecated in recent versions of certbot. Plus, debian moved from using cronjobs for automatic renewals to systemd timer if they are available. On the other hand, now certbot supports having hooks in configuration files. So, instead of what is described above, i would suggest creating a file /etc/letsencrypt/renewal-hooks/deploy/01-reload-nginx with the following content:
don’t forget to make the file executable.
Found the above here: https://www.guyrutenberg.com/2017/01/01/lets-encrypt-reload-nginx-after-renewing-certificates/
Let's see how it does on the next renewals.
Posted on Rocksolid Light