Skip to content

Instantly share code, notes, and snippets.

@kbareis
Last active April 16, 2020 01:45
Show Gist options
  • Save kbareis/fe733c99bb5d36187a9cb12736645fb0 to your computer and use it in GitHub Desktop.
Save kbareis/fe733c99bb5d36187a9cb12736645fb0 to your computer and use it in GitHub Desktop.
Install FAH (Folding@Home) installs the FAHClient and modifies the configuration for idle use. More info at https://bareis.me/helping-a-good-cause-with-foldingathome
#!/bin/sh
# Make sure to grab a username and passkey from https://apps.foldingathome.org/getpasskey
# Variables to configure
Username="AddigyUser" # Modify with your username
Passkey="SomePasswordToChange" # Modify with your passkey
Team="259574" # Addigy Community Team ID
# Nothing else needs to be changed below this line :)
# Installing pkg file (generated via the Add button)
/usr/sbin/installer -pkg "/Library/Addigy/ansible/packages/Folding at Home (7.5.1)/fah-installer_7.5.1_x86_64.pkg" -target /
# Configuring fahclient
# The commands below here send updated configuration settings to Folding@Home
# Note: pausing on battery power is a default behavior
# We are setting the data crunching power to light which will only use up to 50%
# of the CPU. This can be cranked up to medium or full for computers which you
# want to use more CPU resouces for. Adding the user, passkey, and team to the
# config for earning points and bragging rights.
/usr/local/bin/fahclient --send-command "options power=light user=$Username passkey=$Passkey team=$Team"
# Enabling the feature within the client to only run at idle.
/usr/local/bin/fahclient --send-command "slot-options 0 idle=true"
# Saving the configurations above to the config.xml file in /Library/Applicaiton Support/FAHClient
/usr/local/bin/fahclient --send-command save
# Exiting Script
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment