new mac service and local config
This commit is contained in:
@@ -1,19 +1,16 @@
|
||||
on run {daemon_file, agent_file, user}
|
||||
|
||||
set sh1 to "echo " & quoted form of daemon_file & " > /Library/LaunchDaemons/com.carriez.RustDesk_service.plist && chown root:wheel /Library/LaunchDaemons/com.carriez.RustDesk_service.plist;"
|
||||
set sh1 to "echo " & quoted form of daemon_file & " > /Library/LaunchDaemons/com.carriez.RustDesk_service.plist && chown root:wheel /Library/LaunchDaemons/com.carriez.RustDesk_service.plist;"
|
||||
|
||||
set sh2 to "echo " & quoted form of agent_file & " > /Library/LaunchAgents/com.carriez.RustDesk_server.plist && chown root:wheel /Library/LaunchAgents/com.carriez.RustDesk_server.plist;"
|
||||
set sh2 to "echo " & quoted form of agent_file & " > /Library/LaunchAgents/com.carriez.RustDesk_server.plist && chown root:wheel /Library/LaunchAgents/com.carriez.RustDesk_server.plist;"
|
||||
|
||||
set sh3 to "cp -rf /Users/" & user & "/Library/Preferences/com.carriez.RustDesk/RustDesk.toml /var/root/Library/Preferences/com.carriez.RustDesk/;"
|
||||
|
||||
set sh4 to "cp -rf /Users/" & user & "/Library/Preferences/com.carriez.RustDesk/RustDesk2.toml /var/root/Library/Preferences/com.carriez.RustDesk/;"
|
||||
|
||||
set sh5 to "launchctl unload -w /Library/LaunchAgents/com.carriez.RustDesk_server.plist; launchctl load -w /Library/LaunchDaemons/com.carriez.RustDesk_service.plist;"
|
||||
|
||||
set sh6 to "pkill -f rustdesk; launchctl unload -w /Library/LaunchAgents/com.carriez.RustDesk_server.plist; launchctl load -w /Library/LaunchAgents/com.carriez.RustDesk_server.plist; open /Applications/RustDesk.app"
|
||||
set sh5 to "launchctl load -w /Library/LaunchDaemons/com.carriez.RustDesk_service.plist;"
|
||||
|
||||
set sh to sh1 & sh2 & sh3 & sh4 & sh5
|
||||
set sh to sh1 & sh2 & sh3 & sh4 & sh5
|
||||
|
||||
do shell script sh with prompt "RustDesk want to install daemon and agent" with administrator privileges
|
||||
do shell script sh6
|
||||
do shell script sh with prompt "RustDesk want to install daemon and agent" with administrator privileges
|
||||
end run
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
on run {user}
|
||||
|
||||
set sh1 to "cp -rf /Users/" & user & "/Library/Preferences/com.carriez.RustDesk/RustDesk.toml /var/root/Library/Preferences/com.carriez.RustDesk/;"
|
||||
|
||||
set sh2 to "cp -rf /Users/" & user & "/Library/Preferences/com.carriez.RustDesk/RustDesk2.toml /var/root/Library/Preferences/com.carriez.RustDesk/;"
|
||||
|
||||
set sh3 to "launchctl load -w /Library/LaunchDaemons/com.carriez.rustdesk_service.plist;"
|
||||
|
||||
set sh4 to "launchctl load -w /Library/LaunchAgents/com.carriez.rustdesk_server.plist;"
|
||||
|
||||
set sh to sh1 & sh2 & sh3
|
||||
|
||||
do shell script sh with prompt "RustDesk want to launch daemon" with administrator privileges
|
||||
do shell script sh4
|
||||
|
||||
end run
|
||||
@@ -1,6 +0,0 @@
|
||||
set sh1 to "launchctl unload -w /Library/LaunchDaemons/com.carriez.rustdesk_service.plist;"
|
||||
set sh2 to "launchctl unload -w /Library/LaunchAgents/com.carriez.rustdesk_server.plist;"
|
||||
|
||||
do shell script sh1 with prompt "RustDesk want to unload daemon" with administrator privileges
|
||||
do shell script sh2
|
||||
|
||||
Reference in New Issue
Block a user