cli 0.1.13 periphery systemd needed to run 'loginctl enable-linger $USER'

This commit is contained in:
mbecker20
2023-01-12 04:42:29 +00:00
parent cfa3dd537d
commit 809be61e9c
3 changed files with 5 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
[package]
name = "monitor_cli"
version = "0.1.12"
version = "0.1.13"
edition = "2021"
authors = ["MoghTech"]
description = "monitor cli | tools to setup monitor system"

View File

@@ -381,8 +381,10 @@ pub fn start_periphery_systemd(sub_matches: &ArgMatches) {
gen_periphery_service_file(&config_path);
let user = env::var("USER").expect("failed to find $USER env var");
let command =
format!("systemctl --user daemon-reload && systemctl --user enable --now periphery");
format!("systemctl --user daemon-reload && systemctl --user enable --now periphery && loginctl enable-linger {user}");
let output = run_command_pipe_to_terminal(&command);