fix server service not start after daemon installed at first time
This commit is contained in:
parent
07aa0898c5
commit
d5286782cd
@ -12,8 +12,8 @@ on run {daemon_file, root_agent_file, user_agent_file}
|
|||||||
|
|
||||||
set sh6 to "launchctl load -w /Library/LaunchAgents/com.carriez.rustdesk.agent.user.plist;"
|
set sh6 to "launchctl load -w /Library/LaunchAgents/com.carriez.rustdesk.agent.user.plist;"
|
||||||
|
|
||||||
set sh to sh1 & sh2 & sh3 & sh4 & sh5 &sh6
|
set sh to sh1 & sh2 & sh3 & sh4 & sh5
|
||||||
|
|
||||||
log (sh)
|
|
||||||
do shell script sh with prompt "RustDesk 需要安装服务" with administrator privileges
|
do shell script sh with prompt "RustDesk 需要安装服务" with administrator privileges
|
||||||
|
do shell script sh6
|
||||||
end run
|
end run
|
@ -2,6 +2,6 @@ set sh1 to "launchctl load -w /Library/LaunchAgents/com.carriez.rustdesk.agent.r
|
|||||||
|
|
||||||
set sh2 to "launchctl load -w /Library/LaunchAgents/com.carriez.rustdesk.agent.user.plist;"
|
set sh2 to "launchctl load -w /Library/LaunchAgents/com.carriez.rustdesk.agent.user.plist;"
|
||||||
|
|
||||||
set sh to sh1 & sh2
|
do shell script sh1 with prompt "RustDesk 需要停止服务" with administrator privileges
|
||||||
|
|
||||||
do shell script sh with prompt "RustDesk 需要停止服务" with administrator privileges
|
do shell script sh2
|
@ -2,6 +2,6 @@ set sh1 to "launchctl unload -w /Library/LaunchAgents/com.carriez.rustdesk.agent
|
|||||||
|
|
||||||
set sh2 to "launchctl unload -w /Library/LaunchAgents/com.carriez.rustdesk.agent.user.plist;"
|
set sh2 to "launchctl unload -w /Library/LaunchAgents/com.carriez.rustdesk.agent.user.plist;"
|
||||||
|
|
||||||
set sh to sh1 & sh2
|
do shell script sh1 with prompt "RustDesk 需要停止服务" with administrator privileges
|
||||||
|
|
||||||
do shell script sh with prompt "RustDesk 需要停止服务" with administrator privileges
|
do shell script sh2
|
@ -274,7 +274,16 @@ pub async fn start_server(is_server: bool, _tray: bool) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
|
{
|
||||||
|
loop {
|
||||||
|
if crate::platform::macos::is_installed_daemon(false) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
sleep(1.0).await;
|
||||||
|
}
|
||||||
sync_and_watch_config_dir().await;
|
sync_and_watch_config_dir().await;
|
||||||
|
}
|
||||||
|
|
||||||
if is_server {
|
if is_server {
|
||||||
std::thread::spawn(move || {
|
std::thread::spawn(move || {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user