|
1 | | -# container-filebeat.service |
2 | | -# based off |
3 | | -# podman generate systemd filebeat --restart-policy always --new --name |
4 | | -# with pid/cidfiles replaced with --sdnotify=conmon approach |
5 | | - |
6 | 1 | [Unit] |
7 | | -Description=Podman container-filebeat.service |
8 | | -Documentation=man:podman-generate-systemd(1) |
| 2 | +Description=Podman {{ zenith_proxy_client_service_name }}.service |
9 | 3 | Wants=network.target |
10 | 4 | After=network-online.target |
| 5 | +BindsTo={{ zenith_proxy_service_name }}.service |
| 6 | +PartOf={{ zenith_proxy_service_name }}.service |
| 7 | +After={{ zenith_proxy_service_name }}.service |
| 8 | +{% if zenith_proxy_mitm_enabled %} |
| 9 | +Wants={{ zenith_proxy_mitm_service_name }}.service |
| 10 | +After={{ zenith_proxy_mitm_service_name }}.service |
| 11 | +{% endif %} |
11 | 12 |
|
12 | 13 | [Service] |
13 | 14 | Environment=PODMAN_SYSTEMD_UNIT=%n |
| 15 | +Type=simple |
14 | 16 | Restart=always |
| 17 | +User={{ zenith_proxy_podman_user }} |
| 18 | +Group={{ zenith_proxy_podman_user }} |
15 | 19 | ExecStart=/usr/bin/podman run \ |
16 | 20 | --network slirp4netns:cidr={{ podman_cidr }} \ |
17 | | - --sdnotify=conmon \ |
18 | 21 | --cgroups=no-conmon \ |
19 | 22 | --replace \ |
20 | | - --name {{ zenith_proxy_container_name }} \ |
21 | | - --restart=always \ |
| 23 | + --restart=no \ |
| 24 | + --pod {{ zenith_proxy_pod_name }} \ |
| 25 | + --name {{ zenith_proxy_client_container_name }} \ |
22 | 26 | --security-opt label=disable \ |
23 | | - --detach=True \ |
24 | 27 | --volume /etc/zenith/{{ zenith_proxy_service_name }}:/etc/zenith:ro \ |
25 | 28 | --volume {{ zenith_proxy_service_name }}-ssh:/home/zenith/.ssh \ |
26 | 29 | {{ zenith_proxy_client_image }} |
27 | | -ExecStop=/usr/bin/podman stop --ignore {{ zenith_proxy_container_name }} -t 10 |
28 | | -ExecStopPost=/usr/bin/podman rm --ignore -f {{ zenith_proxy_container_name }} |
29 | | -KillMode=none |
30 | | -Type=notify |
31 | | -NotifyAccess=all |
32 | | -User={{ zenith_proxy_podman_user }} |
33 | | -Group={{ zenith_proxy_podman_user }} |
34 | | -TimeoutStartSec=180 |
| 30 | +ExecStop=/usr/bin/podman stop --ignore -t 10 {{ zenith_proxy_client_container_name }} |
| 31 | +ExecStopPost=/usr/bin/podman rm --ignore -f {{ zenith_proxy_client_container_name }} |
35 | 32 |
|
36 | 33 | [Install] |
37 | 34 | WantedBy=multi-user.target default.target |
0 commit comments