fix --server not killed when stop service on mac
This commit is contained in:
parent
886fb73521
commit
0e6d368970
@ -248,6 +248,10 @@ pub fn uninstall_service(show_new_window: bool) -> bool {
|
|||||||
.args(&["remove", &format!("{}_server", crate::get_full_name())])
|
.args(&["remove", &format!("{}_server", crate::get_full_name())])
|
||||||
.status()
|
.status()
|
||||||
.ok();
|
.ok();
|
||||||
|
std::process::Command::new("pkill")
|
||||||
|
.arg(crate::get_app_name())
|
||||||
|
.status()
|
||||||
|
.ok();
|
||||||
if show_new_window {
|
if show_new_window {
|
||||||
std::process::Command::new("sh")
|
std::process::Command::new("sh")
|
||||||
.arg("-c")
|
.arg("-c")
|
||||||
@ -257,11 +261,6 @@ pub fn uninstall_service(show_new_window: bool) -> bool {
|
|||||||
))
|
))
|
||||||
.spawn()
|
.spawn()
|
||||||
.ok();
|
.ok();
|
||||||
} else {
|
|
||||||
std::process::Command::new("pkill")
|
|
||||||
.arg(crate::get_app_name())
|
|
||||||
.status()
|
|
||||||
.ok();
|
|
||||||
}
|
}
|
||||||
quit_gui();
|
quit_gui();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user