remove absolute paths when executing binaries

we set the paths manually, so this is ok

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak
2020-06-15 11:16:11 +02:00
committed by Dietmar Maurer
parent 0b99e5aebc
commit cbef49bf4f
9 changed files with 20 additions and 28 deletions

View File

@ -38,7 +38,7 @@ fn get_full_service_state(service: &str) -> Result<Value, Error> {
let real_service_name = real_service_name(service);
let mut child = Command::new("/bin/systemctl")
let mut child = Command::new("systemctl")
.args(&["show", real_service_name])
.stdout(Stdio::piped())
.spawn()?;
@ -196,7 +196,7 @@ fn run_service_command(service: &str, cmd: &str) -> Result<Value, Error> {
let real_service_name = real_service_name(service);
let status = Command::new("/bin/systemctl")
let status = Command::new("systemctl")
.args(&[cmd, real_service_name])
.status()?;