Skip to content

Instantly share code, notes, and snippets.

@kipyegonmark
Last active July 16, 2016 13:04
Show Gist options
  • Save kipyegonmark/f92cc23b6517099660aae274c3043953 to your computer and use it in GitHub Desktop.
Save kipyegonmark/f92cc23b6517099660aae274c3043953 to your computer and use it in GitHub Desktop.
Let's Encrypt certificate update using systemd timers
[Unit]
Description=Renew Let's Encrypt certificates
[Service]
Type=simple
ExecStart=renew-certificate.sh
#!/bin/sh
apachectl stop
certbot renew --quiet
apachectl start
[Unit]
Description=Monthly renewal of Let's Encrypt's certificates
[Timer]
# once a month
OnCalendar=monthly
Persistent=true
[Install]
WantedBy=timers.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment