Skip to content

Commit 92781e4

Browse files
committed
Install systemd unit into XDG_CONFIG_HOME/systemd/user
Signed-off-by: Samir Benmendil <me@rmz.io>
1 parent 6ca7f73 commit 92781e4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

podman_compose.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1742,7 +1742,7 @@ def compose_systemd(compose, args):
17421742
"""
17431743
create systemd unit file and register its compose stacks
17441744
1745-
When first installed type `sudo podman-compose -a create-unit`
1745+
When first installed type `podman-compose -a create-unit`
17461746
later you can add a compose stack by running `podman-compose -a register`
17471747
then you can start/stop your stack with `systemctl --user start podman-compose@<PROJ>`
17481748
"""
@@ -1789,7 +1789,7 @@ def compose_systemd(compose, args):
17891789
for i in ls:
17901790
print(os.path.basename(i[:-4]))
17911791
elif args.action == "create-unit":
1792-
fn = "/usr/lib/systemd/user/podman-compose@.service"
1792+
fn = f"{config_home}/systemd/user/podman-compose@.service"
17931793
out = f"""\
17941794
# {fn}
17951795
@@ -1819,7 +1819,7 @@ def compose_systemd(compose, args):
18191819
)
18201820
else:
18211821
print(out)
1822-
log(f"Could not write to [{fn}], use 'sudo'")
1822+
log(f"Could not write to [{fn}]")
18231823

18241824

18251825
@cmd_run(podman_compose, "pull", "pull stack images")

0 commit comments

Comments
 (0)