From 158df52e3514f9d2f8f65b6abad9a8e1567f6493 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Sun, 25 Sep 2016 15:55:45 +0300 Subject: [PATCH] roles/nginx: Fix systemd unit for renewing Let's Encrypt certs The `ConditionFileIsExecutable` goes in the [Unit] section! This fixes the error: systemd[1]: [/etc/systemd/system/renew-letsencrypt.service:6] Unknown lvalue 'ConditionFileIsExecutable' in section 'Service' --- roles/nginx/templates/renew-letsencrypt.service.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/nginx/templates/renew-letsencrypt.service.j2 b/roles/nginx/templates/renew-letsencrypt.service.j2 index db96058..c5212d1 100644 --- a/roles/nginx/templates/renew-letsencrypt.service.j2 +++ b/roles/nginx/templates/renew-letsencrypt.service.j2 @@ -1,7 +1,7 @@ [Unit] Description=Renew Let's Encrypt certificates +ConditionFileIsExecutable={{ letsencrypt_certbot_dest }} [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"