From 2b833ea0ac484aa1ff2263624be366ad4c3b6b61 Mon Sep 17 00:00:00 2001 From: Greg Frost <gregfrost1@bigpond.com> Date: Sun, 30 Aug 2009 10:37:14 +0900 Subject: foldingathome: git add run script --- abs/extra-testing/community/foldingathome/PKGBUILD | 4 ++-- abs/extra-testing/community/foldingathome/run | 26 ++++++++++++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 abs/extra-testing/community/foldingathome/run diff --git a/abs/extra-testing/community/foldingathome/PKGBUILD b/abs/extra-testing/community/foldingathome/PKGBUILD index ffd256e..7f6cc20 100644 --- a/abs/extra-testing/community/foldingathome/PKGBUILD +++ b/abs/extra-testing/community/foldingathome/PKGBUILD @@ -4,7 +4,7 @@ pkgname=foldingathome pkgver=6.02 -pkgrel=2 +pkgrel=3 pkgdesc="Folding@Home is a distributed computing project which studies protein folding, misfolding, aggregation, and related diseases." arch=('i686') url="http://folding.stanford.edu/" @@ -15,7 +15,7 @@ install=foldingathome.install source=(http://www.stanford.edu/group/pandegroup/folding/release/FAH$pkgver-Linux.tgz run) md5sums=('112b3d66909050f1bb990993a1464cb9' - '7e1b3f2a6768b4fbeb415922a1a9c2e6') + '87a3a1cea8fbd420068461ed529d9f05') build() { cd $startdir/src/ 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 -- cgit v0.12