Created
September 9, 2019 06:14
-
-
Save Bouni/e0284a3a8567d5382a190521463a150c to your computer and use it in GitHub Desktop.
Systemd LetsEncrypt timer for cert renewal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Certbot certificate renewal | |
[Service] | |
ExecStart=/usr/bin/certbot renew --pre-hook "systemctl stop nginx" --post-hook "systemctl start nginx" | |
ExecStartPost=/usr/bin/systemctl restart nginx |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Timer for Certbot certificate renewal | |
[Timer] | |
OnBootSec=300 | |
OnUnitActiveSec=1w | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment