2022-11-20 15:10:07 +01:00
|
|
|
[Unit]
|
|
|
|
Description=Podman pod-notes.service
|
|
|
|
Documentation=man:podman-generate-systemd(1)
|
|
|
|
Wants=network.target
|
|
|
|
After=network-online.target
|
2023-11-11 15:01:29 +01:00
|
|
|
Wants=pod-notes-joplin.service
|
|
|
|
Before=pod-notes-joplin.service
|
2022-11-20 15:10:07 +01:00
|
|
|
OnFailure=status-mail@%n.service
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
Environment=PODMAN_SYSTEMD_UNIT=%n
|
|
|
|
Restart=on-failure
|
|
|
|
TimeoutStopSec=70
|
|
|
|
ExecStartPre=/bin/rm -f %t/pod-notes.pid %t/pod-notes.pod-id
|
2023-08-18 13:01:36 +02:00
|
|
|
ExecStartPre=/usr/bin/podman pod create \
|
|
|
|
--infra-conmon-pidfile %t/pod-notes.pid \
|
|
|
|
--pod-id-file %t/pod-notes.pod-id \
|
|
|
|
--name=notes \
|
|
|
|
--network=none \
|
|
|
|
--replace
|
2022-11-20 15:10:07 +01:00
|
|
|
ExecStart=/usr/bin/podman pod start --pod-id-file %t/pod-notes.pod-id
|
2022-12-18 00:05:58 +01:00
|
|
|
ExecStartPost=/usr/bin/sh -c 'podman inspect --format "{% raw %}{{ .State.Pid }}{% endraw %}" $(podman inspect --format "{% raw %}{{ .InfraContainerID }}{% endraw %}" notes) > {{ services_containers_directory }}/pod-notes/pidfile'
|
2023-08-13 21:41:47 +02:00
|
|
|
ExecStartPost=/usr/bin/sudo /usr/sbin/ifdown --ignore-errors veth-notes
|
|
|
|
ExecStartPost=/usr/bin/sudo /usr/sbin/ifup veth-notes
|
|
|
|
ExecStop=/usr/bin/sudo /usr/sbin/ifdown --ignore-errors veth-notes
|
2022-11-20 15:10:07 +01:00
|
|
|
ExecStop=/usr/bin/podman pod stop --ignore --pod-id-file %t/pod-notes.pod-id -t 10
|
|
|
|
ExecStopPost=/usr/bin/podman pod rm --ignore -f --pod-id-file %t/pod-notes.pod-id
|
2023-08-13 21:41:47 +02:00
|
|
|
ExecStopPost=/bin/rm -f {{ services_containers_directory }}/pod-notes/pidfile
|
2022-11-20 15:10:07 +01:00
|
|
|
PIDFile=%t/pod-notes.pid
|
|
|
|
Type=forking
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target default.target
|