feat(lego): Add ExecStartPre Script option

This commit is contained in:
Jadyn Emma Jäger 2024-03-16 17:30:52 +01:00
parent a412e7161b
commit 82bca3f758
No known key found for this signature in database
GPG key ID: 632410170049FDDA

View file

@ -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 }}/*'