mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-11-24 04:12:20 +08:00
install-service/uninstall-service
This commit is contained in:
parent
0e1e8d2b16
commit
4d7a6dd661
@ -208,6 +208,13 @@ pub fn core_main() -> Option<Vec<String>> {
|
||||
crate::tray::start_tray();
|
||||
}
|
||||
return None;
|
||||
} else if args[0] == "--install-service" {
|
||||
log::info!("start --install-service");
|
||||
crate::platform::install_service();
|
||||
return None;
|
||||
} else if args[0] == "--uninstall-service" {
|
||||
log::info!("start --uninstall-service");
|
||||
crate::platform::uninstall_service(false);
|
||||
} else if args[0] == "--service" {
|
||||
log::info!("start --service");
|
||||
crate::start_os_service();
|
||||
|
@ -132,6 +132,10 @@ pub fn is_can_screen_recording(prompt: bool) -> bool {
|
||||
can_record_screen
|
||||
}
|
||||
|
||||
pub fn install_service() -> bool {
|
||||
is_installed_daemon(false)
|
||||
}
|
||||
|
||||
pub fn is_installed_daemon(prompt: bool) -> bool {
|
||||
let daemon = format!("{}_service.plist", crate::get_full_name());
|
||||
let agent = format!("{}_server.plist", crate::get_full_name());
|
||||
|
Loading…
Reference in New Issue
Block a user