mirror of
https://github.com/containers/podman.git
synced 2025-10-16 02:32:55 +08:00

If no containers need to be restarted, podman-restart prints "Error: you must provide at least one name or id" then fails. Update the service file to handle start and stop symmetrically. See discussion in https://github.com/containers/podman/pull/25131 Signed-off-by: Andrew Sayers <andrew-github.com@pileofstuff.org>
17 lines
460 B
SYSTEMD
17 lines
460 B
SYSTEMD
[Unit]
|
|
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=@@PODMAN@@ $LOGGING stop --all --filter restart-policy=always
|
|
|
|
[Install]
|
|
WantedBy=default.target
|