Skip to content

An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.

linux install service, stop service before start (#8414)

21pages7c45a68870e1
diff --git a/src/platform/linux.rs b/src/platform/linux.rs
index a7fb22c48..cc0192fbf 100644
--- a/src/platform/linux.rs
+++ b/src/platform/linux.rs
@@ -1392,7 +1392,7 @@ pub fn install_service() -> bool {
let cp = switch_service(false);
let app_name = crate::get_app_name().to_lowercase();
if !run_cmds_pkexec(&format!(
- "{cp} systemctl enable {app_name}; systemctl start {app_name};"
+ "{cp} systemctl enable {app_name}; systemctl stop {app_name}; systemctl start {app_name};"
)) {
Config::set_option("stop-service".into(), "Y".into());
return true;