modify daemon install check
This commit is contained in:
parent
8e6dd76c5b
commit
29bb10a40a
@ -100,30 +100,16 @@ pub fn is_can_screen_recording(prompt: bool) -> bool {
|
|||||||
|
|
||||||
pub fn is_installed_daemon(prompt: bool) -> bool {
|
pub fn is_installed_daemon(prompt: bool) -> bool {
|
||||||
if !prompt {
|
if !prompt {
|
||||||
let output = std::process::Command::new("launchctl")
|
|
||||||
.args(vec!["list", "|", "grep", "com.carriez.rustdesk.daemon"])
|
if !std::path::Path::new("/Library/LaunchDaemons/com.carriez.rustdesk.daemon.plist").exists(){
|
||||||
.stdout(std::process::Stdio::piped())
|
|
||||||
.output()
|
|
||||||
.unwrap();
|
|
||||||
if output.stdout.len() <= 0{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
let output = std::process::Command::new("launchctl")
|
if !std::path::Path::new("/Library/LaunchAgents/com.carriez.rustdesk.agent.root.plist").exists(){
|
||||||
.args(vec!["list", "|", "grep", "com.carriez.rustdesk.agent.root"])
|
|
||||||
.stdout(std::process::Stdio::piped())
|
|
||||||
.output()
|
|
||||||
.unwrap();
|
|
||||||
if output.stdout.len() <= 0{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
let output = std::process::Command::new("launchctl")
|
if !std::path::Path::new("/Library/LaunchAgents/com.carriez.rustdesk.agent.user.plist").exists(){
|
||||||
.args(vec!["list", "|", "grep", "com.carriez.rustdesk.agent.user"])
|
|
||||||
.stdout(std::process::Stdio::piped())
|
|
||||||
.output()
|
|
||||||
.unwrap();
|
|
||||||
if output.stdout.len() <= 0{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user