install-service/uninstall-service
This commit is contained in:
parent
0e1e8d2b16
commit
4d7a6dd661
2 changed files with 11 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue