xoxys.lego/templates/etc/systemd/system/lego-renew.service.j2

18 lines
569 B
Plaintext
Raw Normal View History

2024-09-28 20:22:42 +00:00
#jinja2:lstrip_blocks: True
{{ ansible_managed | comment }}
[Unit]
Description=Lego renew
Requires=network-online.target
After=network-online.target
[Service]
Type=oneshot
2024-09-28 20:32:56 +00:00
EnvironmentFile={{ __lego_systemd_env }}
2024-09-28 20:22:42 +00:00
{% for cert in lego_certificates %}
2024-09-28 21:03:36 +00:00
ExecStart={{ __lego_bin_file }} --email="{{ lego_acme_account_email }}" --domains {{ ' --domains '.join(cert.domains) }} $ARGS renew {{ '--renew-hook="' + __lego_base_dir + '/hooks/' + cert.name + '.sh"' if cert.hook is defined else '' }} --days 30 --no-random-sleep
2024-09-28 20:22:42 +00:00
{% endfor %}
[Install]
WantedBy=multi-user.target