This init script makes ‘the foldinator utilities’ start up automatically on boot. It is tested on debian, but should also work on other linux-distros especially the debian-derived, such as ubuntu, kubuntu etc. and probably *BSD as well. It is based on the standard init scripts in debian.
Define the system user fah, the user must have a valid shell, but do not need a password.
adduser --system --home /var/cache/fah --shell /bin/bash
any more restricted or restrictable shell will also probably work.
Download the linux binaries from folding@home.. Put the executable (presently FAH502-Linux.exe or FAH504-Linux.exe) in fah’s home directory and make it executable.
chmod +x /var/cache/fah
Download the init script, save it as /etc/init.d/fah and make it executable
Make links from /etc/rc.d/:
ln -s /etc/init.d/fah /etc/rc2.d/S90fah
To start up the first time, the utilit must be run interactively. As root:
cd /var/cache/fah su fah -c ./FAH502-Linux.exe
(or whatever is the current version) answer the questions that comes up. Remember, if you do not join a group now, the points will not ever be transfered to the group, even if you join one later on.
kill the foldinator:
killall FAH502-Linux.exe
Start the foldinator:
/etc/init.d/fah start
Check that it runs:
ps -u fah
or
top
The latter shall (normally) show the folder as one of the highest entry when sorted by cpu-usage
If you for some reason wants to use another directory or user name, the line(s)
export DIRECTORY=/var/cache/fah USER=fah
in the starup-script should be adjusted accordingly
Disclaimer: It works just fine for me, but I cannot guarantee it will not reformat your cpu, fry your hdd or detune your guitar. Use on own risk
Pingback: John Hobbs on coding, Omaha, and life in general » Blog Archive » F@h Init Script Additions: throttle & unthrottle