summaryrefslogtreecommitdiffstats
path: root/abs/extra-testing/community/foldingathome/run
diff options
context:
space:
mode:
authorGreg Frost <gregfrost1@bigpond.com>2009-08-30 01:37:14 (GMT)
committerGreg Frost <gregfrost1@bigpond.com>2009-08-30 01:37:14 (GMT)
commit2b833ea0ac484aa1ff2263624be366ad4c3b6b61 (patch)
tree7439f49641a9115cd03d411931ee10b64fe78c7a /abs/extra-testing/community/foldingathome/run
parenta56552217f33d3ce4d72d65ca19056d45858a4ee (diff)
downloadlinhes_pkgbuild-2b833ea0ac484aa1ff2263624be366ad4c3b6b61.zip
linhes_pkgbuild-2b833ea0ac484aa1ff2263624be366ad4c3b6b61.tar.gz
linhes_pkgbuild-2b833ea0ac484aa1ff2263624be366ad4c3b6b61.tar.bz2
foldingathome: git add run script
Diffstat (limited to 'abs/extra-testing/community/foldingathome/run')
-rw-r--r--abs/extra-testing/community/foldingathome/run26
1 files changed, 26 insertions, 0 deletions
diff --git a/abs/extra-testing/community/foldingathome/run b/abs/extra-testing/community/foldingathome/run
new file mode 100644
index 0000000..f8d536e
--- /dev/null
+++ b/abs/extra-testing/community/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/folding_$(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 -verbosity 9 &> /dev/null < /dev/null
+fi