wifi: Split out from manager

This commit is contained in:
Vicki Pfau 2024-03-27 15:57:43 -07:00
parent 0d90859841
commit 309f2acc1b
4 changed files with 150 additions and 102 deletions

View file

@ -10,6 +10,8 @@ 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<bool> {
// Run given script and return true on success
let mut child = Command::new(executable).args(args).spawn()?;