Skip to content

Instantly share code, notes, and snippets.

@rolfbjarne
Created January 25, 2017 17:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rolfbjarne/59342e89015004c466ddd386d3029d14 to your computer and use it in GitHub Desktop.
Save rolfbjarne/59342e89015004c466ddd386d3029d14 to your computer and use it in GitHub Desktop.
#!/bin/sh
#
# Remove MTVS build server from the system LaunchAgents
# According to launchd.plist(5):
# FILES
# ~/Library/LaunchAgents Per-user agents provided by the user.
# /Library/LaunchAgents Per-user agents provided by the administrator.
#
# If the plist had been loaded from a previous session, forcefully remove it and potential running mtbserver
(sudo -u $USER launchctl unload -w /Library/LaunchAgents/com.xamarin.mtvs.buildserver.plist &> /dev/null) || true
(sudo -u $USER launchctl remove com.xamarin.mtvs.buildserver &> /dev/null) || true
(killall -KILL mtbserver &> /dev/null) || true
rm -f /Library/LaunchAgents/com.xamarin.mtvs.buildserver.plist
# Remove the plist file for launching the Build Server UI, we decided against this
rm -f /Library/LaunchAgents/com.xamarin.mtvs.buildservergui.plist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment