diff options
author | James Meyer <james.meyer@operamail.com> | 2012-11-26 14:53:38 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2012-11-26 14:53:38 (GMT) |
commit | 19921178a861f4bb631f6ec05d19fcaebc5836a6 (patch) | |
tree | 2ac297a54dad219302261345254fd167c146aaa9 /abs/extra/foldingathome/run | |
parent | c4497a9290ec83a0472113d91cc369b82ba33b47 (diff) | |
download | linhes_pkgbuild-19921178a861f4bb631f6ec05d19fcaebc5836a6.zip linhes_pkgbuild-19921178a861f4bb631f6ec05d19fcaebc5836a6.tar.gz linhes_pkgbuild-19921178a861f4bb631f6ec05d19fcaebc5836a6.tar.bz2 |
folding at home: moved to extra from community
Diffstat (limited to 'abs/extra/foldingathome/run')
-rw-r--r-- | abs/extra/foldingathome/run | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/abs/extra/foldingathome/run b/abs/extra/foldingathome/run new file mode 100644 index 0000000..cd4a072 --- /dev/null +++ b/abs/extra/foldingathome/run @@ -0,0 +1,26 @@ +#!/bin/sh +export TERM=linux +. /etc/rc.conf +. /etc/rc.d/functions +stat_runit "Starting folding@home" + +FOLDING_DIR=/myth/foldingathome/$(hostname) + +if [ -d $FOLDING_DIR ] ; then + cd $FOLDING_DIR + # Ensure that the client configuration file has the same details as /etc/systemconfig + + source /etc/systemconfig + + if [ -n "$foldingusername" ] ; then + sed -i 's/username=.*$/username='$foldingusername'/g' $FOLDING_DIR/client.cfg + fi + + if [ -n "$foldingworksize" ] ; then + sed -i 's/bigpackets=.*$/bigpackets='$foldingworksize'/g' $FOLDING_DIR/client.cfg + fi + + # No need to direct output to a log file becase a log file + # will automatically be placed in $FOLDING_DIR + exec /usr/bin/fah6 &> /dev/null < /dev/null +fi |