From 7a2956fc9bc67ea7250874fe2e9d8e0959baf3ab Mon Sep 17 00:00:00 2001 From: qdlmcfresh Date: Mon, 5 Dec 2022 23:39:00 +0100 Subject: [PATCH] remove user from systemd-service to fix crash on service startup --- crates/kr/src/launch.rs | 2 -- crates/kr/templates/linux/systemd.service | 1 - 2 files changed, 3 deletions(-) diff --git a/crates/kr/src/launch.rs b/crates/kr/src/launch.rs index 3895e16..37cbc63 100644 --- a/crates/kr/src/launch.rs +++ b/crates/kr/src/launch.rs @@ -101,7 +101,6 @@ struct SystemdService { description: String, bin_path: String, bin_name: String, - current_user: String, } #[cfg(target_os = "linux")] @@ -111,7 +110,6 @@ impl From for SystemdService { bin_name: d.bin_name, bin_path: d.bin_path, description: env!("CARGO_PKG_DESCRIPTION").to_string(), - current_user: whoami::username(), } } } diff --git a/crates/kr/templates/linux/systemd.service b/crates/kr/templates/linux/systemd.service index 3bbcc0e..843f458 100644 --- a/crates/kr/templates/linux/systemd.service +++ b/crates/kr/templates/linux/systemd.service @@ -4,7 +4,6 @@ Description={{bin_name}} [Service] ExecStart={{bin_path}} start Restart=on-failure -User={{current_user}} [Install] WantedBy=default.target