mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
refactor linux install/uninstall service as windows
This commit is contained in:
@@ -278,13 +278,17 @@ pub fn set_option(key: String, value: String) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
#[cfg(any(target_os = "windows"))]
|
||||
#[cfg(any(target_os = "windows", target_os = "linux"))]
|
||||
{
|
||||
if crate::platform::is_installed() {
|
||||
if value == "Y" {
|
||||
allow_err!(crate::platform::uninstall_service(true));
|
||||
if crate::platform::uninstall_service(true) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
allow_err!(crate::platform::install_service());
|
||||
if crate::platform::install_service() {
|
||||
return;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user