ansible-personal/roles/nginx/templates/renew-letsencrypt.service.j2
Alan Orth 60c498f5ae
roles/nginx: Add sanity check to systemd service for renewing Let's Encrypt certs
Just in case, we'd better make sure that certbot is installed and
usable (+x) before we try running it.
2016-08-17 12:27:33 +03:00

8 lines
273 B
Django/Jinja

[Unit]
Description=Renew Let's Encrypt certificates
[Service]
Type=oneshot
ConditionFileIsExecutable={{ letsencrypt_certbot_dest }}
ExecStart={{ letsencrypt_certbot_dest }} renew --standalone --pre-hook "/bin/systemctl stop nginx" --post-hook "/bin/systemctl start nginx"