2022-09-26 23:10:48 +02:00
|
|
|
[Unit]
|
2023-07-17 22:31:05 +02:00
|
|
|
Description=Podman container-{{ services_service_name }}-certbot.service
|
2022-09-26 23:10:48 +02:00
|
|
|
Documentation=man:podman-generate-systemd(1)
|
2022-10-30 22:09:01 +01:00
|
|
|
OnFailure=status-mail@%n.service
|
2022-09-26 23:10:48 +02:00
|
|
|
|
|
|
|
[Service]
|
|
|
|
Environment=PODMAN_SYSTEMD_UNIT=%n
|
|
|
|
TimeoutStopSec=70
|
2023-07-17 22:31:05 +02:00
|
|
|
ExecStartPre=/bin/rm -f %t/container-{{ services_service_name }}-certbot.pid %t/container-{{ services_service_name }}-certbot.ctr-id
|
2022-10-06 23:15:06 +02:00
|
|
|
ExecStartPre=/usr/bin/podman pull docker.io/certbot/certbot
|
2022-11-02 19:36:59 +01:00
|
|
|
ExecStart=/usr/bin/podman run \
|
2023-07-17 22:31:05 +02:00
|
|
|
--conmon-pidfile %t/container-{{ services_service_name }}-certbot.pid \
|
|
|
|
--cidfile %t/container-{{ services_service_name }}-certbot.ctr-id \
|
2022-11-02 19:36:59 +01:00
|
|
|
--cgroups=no-conmon \
|
2023-07-17 22:31:05 +02:00
|
|
|
--pod-id-file %t/pod-{{ services_service_name }}.pod-id \
|
2022-11-02 19:36:59 +01:00
|
|
|
--replace \
|
2023-07-23 00:37:19 +02:00
|
|
|
-v {{ system_etc_root_directory }}/resolv.conf:/etc/resolv.conf:ro \
|
2023-07-18 23:18:00 +02:00
|
|
|
-v {{ services_data_directory }}/{{ services_service_user_name }}/etc-letsencrypt/_data:/etc/letsencrypt \
|
2022-11-02 19:36:59 +01:00
|
|
|
-v var-lib-letsencrypt:/var/lib/letsencrypt \
|
|
|
|
-v var-www-html:/var/www/html \
|
2023-07-17 22:31:05 +02:00
|
|
|
--name=pod-{{ services_service_name }}-certbot \
|
2022-11-02 19:36:59 +01:00
|
|
|
docker.io/certbot/certbot --non-interactive renew
|
2023-07-17 22:31:05 +02:00
|
|
|
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/container-{{ services_service_name }}-certbot.ctr-id
|
2022-10-02 14:56:43 +02:00
|
|
|
Type=oneshot
|