#!/bin/sh

# Folding@Home on OSX Control Script
# Written by: Matthew L Beckler (matthew at mbeckler dot org)
#
# Usage: ./fah_ctl.sh {load|unload}
#
# This script will load or unload the F@H client daemon.

if [ ! $1 ] || [ "$1" != "load" -a "$1" != "unload" ]; then
    echo "Usage: `basename $0` {load|unload}"
    exit 1
else
    sudo launchctl $1 /Library/LaunchDaemons/Folding\@home.plist
fi

exit 0


