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.
This commit is contained in:
2016-08-17 12:27:33 +03:00
parent 2a78c5cf59
commit 60c498f5ae

View File

@ -3,4 +3,5 @@ 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"