Use systemd-run to spawn commands when running as system service

This commit is contained in:
cyber-sushi 2024-05-23 04:51:50 +02:00
parent 24be50aa05
commit 69a2b9be16

View file

@ -482,7 +482,8 @@ impl EventReader {
cmd cmd
} }
else { else {
command.clone() let cmd = format!("systemd-run --user -M {}@ {}", user, command);
cmd
}; };
match fork() { match fork() {
Ok(Fork::Child) => { Ok(Fork::Child) => {