mirror of
https://gitlab.steamos.cloud/holo/steamos-manager.git
synced 2025-07-12 09:22:26 -04:00
systemd: Add new module for interacting with systemd
This commit is contained in:
parent
9ec6fc8852
commit
853ce3dd84
5 changed files with 123 additions and 40 deletions
|
@ -10,8 +10,6 @@ use std::ffi::OsStr;
|
|||
use tokio::process::Command;
|
||||
use tracing::warn;
|
||||
|
||||
pub const SYSTEMCTL_PATH: &str = "/usr/bin/systemctl";
|
||||
|
||||
pub async fn script_exit_code(executable: &str, args: &[impl AsRef<OsStr>]) -> Result<i32> {
|
||||
// Run given script and return the exit code
|
||||
let mut child = Command::new(executable).args(args).spawn()?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue