SiriusB said:
Would using
Code:
$HOME/foldingathome/folding restart
be acceptable? This would then remove the need for the vast majority of people to edit the script.
Well not really. $HOME does the equivalent of ~, so when a cron job runs, it'll have a value of "/root". All you really need to do is setup a user editable global variable right at the top of the script (so its obvious), in which people enter their real home directory.
SiriusB said:
Also, how do you get this script to work with cron? I spent an hour last night trying to get it working without any luck. All I did find out was that cron uses an sh shell and not bash... or something! I couldn't find a definitive answer to actually get around this/make it work.
Fire up the crontab editor with
Then add an entry like this
Code:
0 * * * * root /home/user/fahcheck
That will launch the /home/user/fahcheck script under the user "root" on every day of every month on every hour at minute 0.
You don't have to be root to do these modifications, since every user can have their own crontab. In actual fact, you could set the actual cron job to run as "user", which would eliminate the $HOME problem altogether if you really wanted.
(I normally use the global crontab and run the jobs as root, for this, just edit /etc/crontab as root)
SiriusB said:
I would welcome any help and advice! Since I am one for doing things myself - gotta learn these things, right? - could you just give me a clue as to how to safely stop and start a non-finstall SMP client. [I did try to find the answer in finstalls folding script but that thing is a beast].
The simplest way to stop the SMP client outside of finstall is to run
Code:
killall -QUIT FahCore_a1.exe
This will tell the core(s) to exit and close the client.
You'd still need to do some sanity checking to make sure the client had closed, by grepping the output of ps for fahcores, mpiexec and fah5. Once you're sure everything is dead, you can go about restarting the client. For that you need to cd into the fah5 local directory, sanity check that using pwd, then fire her up.