Created
February 10, 2013 02:41
-
-
Save natewalck/4748129 to your computer and use it in GitHub Desktop.
Labstats Postflight Continued
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Step 1: Kill any exising processes | |
sudo killall mono | |
sudo killall LabStatsClient | |
#step 1.5 Stop any agents. | |
launchctl unload /Library/LaunchDaemons/LabStats.plist | |
#launchctl unload -D all /Library/LaunchAgents/LabStats.plist | |
#launchctl unload /Library/LaunchAgents/LabStats.plist | |
#Step 2: Delete any existing LabStats resources | |
if [ -d "/Applications/LabStats" ]; then | |
sudo rm -rf "/Applications/LabStats" | |
fi | |
if [ -d "/Library/StartupItems/CLSService" ]; then | |
sudo rm -rf "/Library/StartupItems/CLSService" | |
fi | |
if [ -d "/Library/Application Support/LabStats" ]; then | |
sudo rm -rf "/Library/Application Support/LabStats" | |
fi | |
if [ -d "/Library/StartupItems/CLSService" ]; then | |
sudo rm -rf "/Library/StartupItems/CLSService" | |
fi | |
if [ "/Library/LaunchDaemons/LabStats.plist" ]; then | |
sudo rm -rf "/Library/LaunchDaemons/LabStats.plist" | |
fi | |
if [ "/Library/LaunchAgents/LabStats.plist" ]; then | |
sudo rm -rf "/Library/LaunchAgents/LabStats.plist" | |
fi | |
... | |
#Step 5: Reload agents | |
launchctl load /Library/LaunchDaemons/LabStats.plist | |
# RJS- Commented this out; it runs the UserSpace as root, which is odd | |
# The other option is to find out a way to | |
# launch this for each running user | |
# launchctl load /Library/LaunchAgents/LabStats.plist |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment