From 1ff380b3b66429b871023afc9c5e891b5147f750 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= <hugo@lysator.liu.se> Date: Tue, 9 May 2023 17:48:34 +0200 Subject: [PATCH] Fix system execs. --- manifests/user_instance.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifests/user_instance.pp b/manifests/user_instance.pp index cd4450b..ff6bb64 100644 --- a/manifests/user_instance.pp +++ b/manifests/user_instance.pp @@ -55,14 +55,14 @@ define mpd::user_instance ( } ~> Exec["Restart user ${user} mpd instance"] exec { "Enable user ${user} mpd instance": - command => "systemctl enable --now --user ${service_name}", + command => "systemctl enable --machine=${user}@.host --now --user ${service_name}", creates => "${xdg_config_home}/systemd/user/default.target.wants/mpd.service", user => $user, path => ['/bin', '/usr/bin'], } exec { "Restart user ${user} mpd instance": - command => "systemctl restart --user ${service_name}", + command => "systemctl restart --machine=${user}@.host --user ${service_name}", refreshonly => true, path => ['/bin', '/usr/bin'], } -- GitLab