fix agent service check

This commit is contained in:
hardy 2023-06-09 20:06:36 +08:00
parent 4da11c47e9
commit a29e969eed
No known key found for this signature in database
GPG Key ID: D1ED7F7A9ED520C3
1 changed files with 3 additions and 1 deletions

View File

@ -213,7 +213,9 @@ fi
$sudo_cmd chmod +x $agent_exc
#try to stop and uninstall service
if [[ -e /etc/systemd/system/agent.service ]]; then
macos=/Library/LaunchDaemons/agent.plist
linux=/etc/systemd/system/agent.service
if [[ -f "$linux" || -f "$macos" ]]; then
printf "\n* stop && uninstall service\n"
$sudo_cmd $agent_exc -service stop &>/dev/null
$sudo_cmd $agent_exc -service uninstall &>/dev/null