From 68951a77554ab59130278b4db230d4cd938ddc87 Mon Sep 17 00:00:00 2001 From: Triantafyllos Date: Sat, 16 Sep 2023 15:46:56 +0300 Subject: [PATCH] Add --in-pod parameter for systemd commands systemd scripts depend an a pod to exist but this is not created unless the in-pod parameter is added Signed-off-by: Triantafyllos --- podman_compose.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/podman_compose.py b/podman_compose.py index 20011455..a2f7d22d 100755 --- a/podman_compose.py +++ b/podman_compose.py @@ -2000,7 +2000,7 @@ def compose_systemd(compose, args): f.write(f"{k}={v}\n") print(f"writing [{fn}]: done.") print("\n\ncreating the pod without starting it: ...\n\n") - process = subprocess.run([script, "up", "--no-start"], check=False) + process = subprocess.run([script, "--in-pod", proj_name, "up", "--no-start"], check=False) print("\nfinal exit code is ", process.returncode) username = getpass.getuser() print( @@ -2039,7 +2039,7 @@ def compose_systemd(compose, args): [Service] Type=simple EnvironmentFile=%h/{stacks_dir}/%i.env -ExecStartPre=-{script} up --no-start +ExecStartPre=-{script} --in-pod %i up --no-start ExecStartPre=/usr/bin/podman pod start pod_%i ExecStart={script} wait ExecStop=/usr/bin/podman pod stop pod_%i