For those that have trouble, this is how I did it:
Make a directory to install F@H in. Location doesn't particularly matter... I chose /home/fah so I'll be using that throughout the post. Download the F@H client to the newly created folder and run it as root:
Code:
sudo mkdir /home/fah
cd /home/fah
sudo wget http://www.stanford.edu/group/pandegroup/release/FAH502-Linux.exe
sudo chmod +x FAH502-Linux.exe
sudo ./FAH502-Linux.exe
Enter the required info, and when F@H starts working on a work unit, close the client. Now to set up the startup scripts.
Make a file called fah in the /etc/init.d directory:
Code:
sudo gedit /etc/init.d/fah
Paste this into /etc/init.d/fah:
Code:
#!/bin/sh
# /etc/init.d/fah for Ubuntu
# Start/stop/restart the F@H service.
fah_start() {
if [ -x /home/fah/startfah.sh ]; then
echo "Starting F@H: /home/fah/startfah.sh"
/home/fah/startfah.sh
fi
}
fah_stop() {
sudo killall FAH502-Linux.exe
}
fah_restart() {
fah_stop
sleep 2
fah_start
}
case "$1" in
'start')
fah_start
;;
'stop')
fah_stop
;;
'restart')
fah_restart
;;
*)
fah_start
esac
Save the file and close gedit, and finally make the file executable:
Code:
sudo chmod +x /etc/init.d/fah
Now the startfah.sh script:
Code:
sudo gedit /home/fah/startfah.sh
and paste this into it:
Code:
#!/bin/sh
cd /home/fah
/home/fah/FAH502-Linux.exe -forceasm -advmethods >/dev/null 2>&1 &
exit 0
And don't forget to make it executable!
Code:
sudo chmod +x /home/fah/startfah.sh
Feel free to remove the -forceasm and -advmethods flags, or add others of your own. I find those flags increase my weekly output a bit. For more info on what they do, see
here.
last and final step! Make a symlink into the /etc/rc2.d directory!
Code:
ln -s /etc/init.d/fah /etc/rc2.d/S99fah
You can either test the script by rebooting or by typing the command:
Code:
sudo /etc/init.d/fah start
Open the System Monitor and watch your CPU usage skyrocket
Many thanks to
XtremeSystems for the startfah.sh script and a good friend of mine for the /etc/init.d/fah script

Bookmarks