diff --git a/roles/lego/templates/lego.service.j2 b/roles/lego/templates/lego.service.j2 index cbfef73..00f0c5e 100644 --- a/roles/lego/templates/lego.service.j2 +++ b/roles/lego/templates/lego.service.j2 @@ -14,6 +14,9 @@ User={{ lego_user_res.name }} WorkingDirectory={{ lego_base_path }} ExecStartPre=+-chown {{ lego_certificate_store_user }}:{{ lego_certificate_store_group }} {{ lego_certificate_store }} ExecStartPre=+-chmod {{ lego_certificate_store_mode }} {{ lego_certificate_store }} +{% if lego_pre_renewal_script is defined %} +ExecStartPre=+-{{ lego_pre_renewal_script }} +{% endif %} ExecStart={{ lego_command_systemd }} ExecStartPost=+-/bin/sh -c 'chown {{ lego_certificate_store_user }}:{{ lego_certificate_store_group }} {{ lego_certificate_store }}/*' ExecStartPost=+-/bin/sh -c 'chmod 0640 {{ lego_certificate_store }}/*'