Stop the previous desktop agent when updating on macOS. Fixes #6441 (#7015)

This commit is contained in:
Artemis Tosini 2022-08-02 17:03:14 -04:00 committed by GitHub
parent e2c8700013
commit b56d2e452e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View file

@ -0,0 +1 @@
* Stop the old version of Fleet desktop before starting a new version.

View file

@ -55,6 +55,8 @@ ln -sf /opt/orbit /var/lib/orbit
DAEMON_LABEL="com.fleetdm.orbit"
DAEMON_PLIST="/Library/LaunchDaemons/${DAEMON_LABEL}.plist"
# Stop the previous desktop agent
pkill fleet-desktop || true
# Remove any pre-existing version of the config
launchctl bootout "system/${DAEMON_LABEL}"
# Add the daemon to the launchd system