remove --user and add sudo for systemctl calls
This commit is contained in:
parent
01138eef35
commit
fcb17d6802
@ -44,8 +44,8 @@ impl SbotStat {
|
||||
pub fn sbot_stats() -> Result<SbotStat, StatsError> {
|
||||
let mut status = SbotStat::default();
|
||||
|
||||
let info_output = Command::new("/usr/bin/systemctl")
|
||||
.arg("--user")
|
||||
let info_output = Command::new("sudo")
|
||||
.arg("systemctl")
|
||||
.arg("show")
|
||||
.arg("go-sbot.service")
|
||||
.arg("--no-page")
|
||||
@ -66,8 +66,8 @@ pub fn sbot_stats() -> Result<SbotStat, StatsError> {
|
||||
}
|
||||
}
|
||||
|
||||
let status_output = Command::new("/usr/bin/systemctl")
|
||||
.arg("--user")
|
||||
let status_output = Command::new("sudo")
|
||||
.arg("systemctl")
|
||||
.arg("status")
|
||||
.arg("go-sbot.service")
|
||||
.output()
|
||||
|
Loading…
Reference in New Issue
Block a user