Created
April 16, 2020 01:41
-
-
Save kbareis/4267ae9379adf7725d27951d48c66062 to your computer and use it in GitHub Desktop.
Uninstall FAH (Folding@Home) removes the FAHClient, LaunchDaemons, and config files. More info at https://bareis.me/helping-a-good-cause-with-foldingathome
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 | |
# This script has been largely taken from Folding@Home's default removal script | |
# with modifications being only in shortening as we care less about prior names | |
# of items. We have added in an additional step in removing the config folder | |
# terminate FAHControl and FAHViewer if running | |
/usr/bin/killall -TERM FAHControl FAHViewer | |
# stop folding service | |
LaunchDaemon="/Library/LaunchDaemons/org.foldingathome.fahclient.plist" | |
if [ -f "$LaunchDaemon" ]; then | |
/bin/launchctl unload -w "$LaunchDaemon" | |
rm -f "$LaunchDaemon" | |
else | |
# try to unload job, even if user manually deleted plist | |
/bin/launchctl remove org.foldingathome.fahclient | |
fi | |
# kill any FAHClient still running | |
if /bin/ps auxwww | grep "FAHClient" | grep -v 'grep'; then | |
/bin/sleep 5 | |
/usr/bin/killall -TERM FAHClient | |
fi | |
# remove scripts, symlinks, executables | |
/bin/rm -f /usr/local/bin/FAH{Client,CoreWrapper} | |
# remove config files | |
/bin/rm -rf "/Library/Application Support/FAHClient" | |
# remove apps | |
/bin/rm -rf "/Applications/Folding@home" | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment