Skip to content

Instantly share code, notes, and snippets.

@claudusd
Created May 29, 2017 19:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save claudusd/136416933337629f0e5a3236209ee6cc to your computer and use it in GitHub Desktop.
Save claudusd/136416933337629f0e5a3236209ee6cc to your computer and use it in GitHub Desktop.
Systemd Ceritbot
### https://unix.stackexchange.com/a/334644
### Service SSL Reload .target
[Unit]
Description=Services which need reloaded with SSL certs are updated.
PropagatesReloadTo=apache2
### Service SSL Reload .path
[Unit]
Description=Restart services which use SSL when the cert directory changes
[Path]
PathChanged=/
Unit=ssl-restart.target
[Install]
WantedBy=multi-user.target
### Certybot renewal .timer
[Unit]
Description=Run Every 80 days to renew Let's encrypt
[Timer]
OnActiveSec=80d
Persistent=true
Unit=lests-encrypt-renew.target
[Install]
WantedBy=default.target
### Certybot renewal .service
[Unit]
Description=Renew certificat
[Service]
ExecStart=/usr/sbin/foo-cleanup
After=ssl-restart.targer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment