From 92781e4487a4bbee84a39dfe378c28615fc33746 Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Sat, 16 Apr 2022 12:30:24 +0000 Subject: [PATCH] Install systemd unit into XDG_CONFIG_HOME/systemd/user Signed-off-by: Samir Benmendil --- podman_compose.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/podman_compose.py b/podman_compose.py index 6e10e72..49c4427 100755 --- a/podman_compose.py +++ b/podman_compose.py @@ -1742,7 +1742,7 @@ def compose_systemd(compose, args): """ create systemd unit file and register its compose stacks - When first installed type `sudo podman-compose -a create-unit` + When first installed type `podman-compose -a create-unit` later you can add a compose stack by running `podman-compose -a register` then you can start/stop your stack with `systemctl --user start podman-compose@` """ @@ -1789,7 +1789,7 @@ def compose_systemd(compose, args): for i in ls: print(os.path.basename(i[:-4])) elif args.action == "create-unit": - fn = "/usr/lib/systemd/user/podman-compose@.service" + fn = f"{config_home}/systemd/user/podman-compose@.service" out = f"""\ # {fn} @@ -1819,7 +1819,7 @@ def compose_systemd(compose, args): ) else: print(out) - log(f"Could not write to [{fn}], use 'sudo'") + log(f"Could not write to [{fn}]") @cmd_run(podman_compose, "pull", "pull stack images")