test vcpkg new in android

This commit is contained in:
rustdesk
2024-05-01 12:58:27 +08:00
parent b1722a085e
commit 08b7e036b4
3 changed files with 50 additions and 38 deletions

View File

@@ -778,9 +778,10 @@ pub fn get_capturables() -> Result<Vec<PipeWireCapturable>, Box<dyn Error>> {
}
fn is_server_running() -> bool {
let app_name = config::APP_NAME.read().unwrap().clone().to_lowercase();
let output = match Command::new("sh")
.arg("-c")
.arg("ps aux | grep rustdesk")
.arg(&format!("ps aux | grep {}", app_name))
.output()
{
Ok(output) => output,
@@ -790,6 +791,6 @@ fn is_server_running() -> bool {
};
let output_str = String::from_utf8_lossy(&output.stdout);
let is_running = output_str.contains("rustdesk --server");
let is_running = output_str.contains(&format!("{} --server", app_name));
is_running
}