Folding@Home using daemontools
Updated: 10/21/2005
General Information
This guide will help you set up Folding@Home using Dan Bernstein's daemontools, for easy maintenance and also so that on a server reboot folding@home automatically comes back up.Requirements
You will need the following items to be able to complete this guide:Installing Linux Compat
Folding@home only makes Linux binaries. If you do not have the Linux emulation mode enabled, then run the following command:|
# # |
pkg_add -r linux_base-8 echo 'linux_enable="YES"' >> /etc/rc.conf |
/usr/ports/emulators/linux_base-8/
| # | shutdown -r now |
Setting up Folding@home
Here one creates the service directory and also a directory where the Folding@home client is run.|
# # |
mkdir /usr/local/folding@home/ mkdir /usr/local/folding@home/root |
|
# # # # |
cd /usr/local/folding@home/root/ fetch http://www.stanford.edu/group/pandegroup/release/FAH502-Linux.exe chmod +x FAH502-Linux.exe brandelf -t Linux FAH502-Linux.exe |
|
# # # |
mkdir /usr/local/folding@home/log mkdir /usr/local/folding@home/env mkdir /usr/local/folding@home/log/main |
|
# # # |
cd /usr/local/folding@home chown -R nobody:nobody root env log/main chmod 2755 root log log/main |
|
# # # |
cd root setuidgid nobody ./FAH502-Linux.exe -configonly cd .. |
|
# # # # # # # # # |
cat << EOF > run #!/bin/sh exec 2>&1 exec envdir ./env sh -c ' cd /usr/local/folding@home/root/ exec setuidgid nobody /usr/bin/nice -n 20 /usr/local/folding@home/root/FAH502-Linux.exe -freeBSD ' EOF chmod 700 run |
|
# # # # # |
cat << EOF > log/run #!/bin/sh exec setuidgid nobody multilog t ./main EOF chmod 700 log/run |
Starting Folding@home
Now, to get Folding@Home started using svscan and have it running under supervise, we have to let svscan know about our service.|
# # |
cd /var/service ln -s /usr/local/folding@home |
| # | ps auxwwww | grep -i fah |
FAH*-Core.exe, this means you are good to go. To check how long it has been running, use svstat like follows:| # | svstat /var/service/folding@home/ |
This guide is © 2005 - 2012 Bert JW Regeer.
Author: Bert JW Regeer
bsdguides at 0x58 dot com