ansible-edda/playbooks/roles/services/deploy/git/templates/systemd/pod-git.service

26 lines
1.2 KiB
SYSTEMD
Raw Normal View History

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