Created
July 23, 2017 17:05
-
-
Save libook/58257bf747af55dfd2563f49eb141a29 to your computer and use it in GitHub Desktop.
Systemd service for Let's Encrypt.
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=Renews letsencrypt certificates | |
After=network.target | |
[Service] | |
Type=oneshot | |
WorkingDirectory=/etc/letsencrypt | |
ExecStart=/usr/bin/certbot renew --quiet --agree-tos --pre-hook "systemctl stop nginx.service" --post-hook "systemctl restart nginx.service" |
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=letsencrypt timer | |
[Timer] | |
OnCalendar=daily | |
Persistent=true | |
Unit=letsencrypt.service | |
[Install] | |
WantedBy=basic.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment