Add ExecStop and dependencies to fix shutdown

Signed-off-by: Andrin Brunner <andrin@acloud.one>
This commit is contained in:
Andrin Brunner 2022-06-01 16:02:18 +02:00
parent 70ce77e8d0
commit 1933972909
Failed to extract signature
1 changed files with 3 additions and 0 deletions

View File

@ -2,12 +2,15 @@
Description=Podman Start All Containers With Restart Policy Set To Always
Documentation=man:podman-start(1)
StartLimitIntervalSec=0
Wants=network-online.target
After=network-online.target
[Service]
Type=oneshot
RemainAfterExit=true
Environment=LOGGING="--log-level=info"
ExecStart=@@PODMAN@@ $LOGGING start --all --filter restart-policy=always
ExecStop=/bin/sh -c '@@PODMAN@@ $LOGGING stop $(@@PODMAN@@ container ls --filter restart-policy=always -q)'
[Install]
WantedBy=default.target