From 82bca3f758b9feb64094d296a204995a16cac7ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jadyn=20Emma=20J=C3=A4ger?= Date: Sat, 16 Mar 2024 17:30:52 +0100 Subject: [PATCH] feat(lego): Add ExecStartPre Script option --- roles/lego/templates/lego.service.j2 | 3 +++ 1 file changed, 3 insertions(+) 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 }}/*'