2023-02-21 00:06:29 +01:00
|
|
|
[Unit]
|
|
|
|
Description=Podman pod-music.service
|
|
|
|
Documentation=man:podman-generate-systemd(1)
|
|
|
|
Wants=network.target
|
|
|
|
After=network-online.target
|
2023-03-19 18:11:16 +01:00
|
|
|
Requires=container-music-collection.service container-music-archive.service
|
|
|
|
Before=container-music-collection.service container-music-archive.service
|
2023-02-21 00:06:29 +01:00
|
|
|
OnFailure=status-mail@%n.service
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
Environment=PODMAN_SYSTEMD_UNIT=%n
|
|
|
|
Restart=on-failure
|
|
|
|
TimeoutStopSec=70
|
|
|
|
ExecStartPre=/bin/rm -f %t/pod-music.pid %t/pod-music.pod-id
|
|
|
|
ExecStartPre=/usr/bin/podman pod create --infra-conmon-pidfile %t/pod-music.pid --pod-id-file %t/pod-music.pod-id --name=music --network=none --replace
|
|
|
|
ExecStart=/usr/bin/podman pod start --pod-id-file %t/pod-music.pod-id
|
|
|
|
ExecStartPost=/usr/bin/sh -c 'podman inspect --format "{% raw %}{{ .State.Pid }}{% endraw %}" $(podman inspect --format "{% raw %}{{ .InfraContainerID }}{% endraw %}" music) > {{ services_containers_directory }}/pod-music/pidfile'
|
2023-07-29 14:38:57 +02:00
|
|
|
ExecStartPost=/usr/bin/sh -c 'while [ -z "$(ip link show dev veth-music up)" ] ; do echo "veth-music is not ready yet" && sleep 1 ; done'
|
2023-02-21 00:06:29 +01:00
|
|
|
ExecStop=/usr/bin/podman pod stop --ignore --pod-id-file %t/pod-music.pod-id -t 10
|
|
|
|
ExecStopPost=/usr/bin/podman pod rm --ignore -f --pod-id-file %t/pod-music.pod-id
|
|
|
|
PIDFile=%t/pod-music.pid
|
|
|
|
Type=forking
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target default.target
|