diff options
author | James Meyer <james.meyer@operamail.com> | 2012-12-04 21:43:03 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2012-12-04 21:43:03 (GMT) |
commit | 251aa67903af196b8cfe6eac0ff04a37a456238d (patch) | |
tree | 9a7ac8b732af6ef404c598be204ec0966b150e47 /abs/core/runit-scripts/runitscripts/services/fah/run | |
parent | 8e702ef5d09ff99df8249f0046e7081b6130812a (diff) | |
download | linhes_pkgbuild-251aa67903af196b8cfe6eac0ff04a37a456238d.zip linhes_pkgbuild-251aa67903af196b8cfe6eac0ff04a37a456238d.tar.gz linhes_pkgbuild-251aa67903af196b8cfe6eac0ff04a37a456238d.tar.bz2 |
runit-scripts: move folding_at_home scripts to runitscripts
Configuration of FAH was moved to the run script so it no longer needs or uses config.xml
However if /etc/fah-config.xml is present it will use it and skip using values from /etc/systemconfig
refs #872
Diffstat (limited to 'abs/core/runit-scripts/runitscripts/services/fah/run')
-rw-r--r-- | abs/core/runit-scripts/runitscripts/services/fah/run | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/abs/core/runit-scripts/runitscripts/services/fah/run b/abs/core/runit-scripts/runitscripts/services/fah/run new file mode 100644 index 0000000..1a3b8a6 --- /dev/null +++ b/abs/core/runit-scripts/runitscripts/services/fah/run @@ -0,0 +1,27 @@ +#!/bin/sh +export TERM=linux +. /etc/rc.conf +. /etc/rc.d/functions +configfile=/etc/fah-config.xml +. /etc/systemconfig +FOLDING_DIR=/data/storage/disk0/media/foldingathome/$hostname +mkdir -p $FOLDING_DIR +chown mythtv:mythtv $FOLDING_DIR + +if [ -d $FOLDING_DIR ] +then + cd $FOLDING_DIR + if [ -e $configfile ] + then + stat_runit "Starting folding@home with $configfile" + exec /opt/fah-v7/FAHClient --config $configfile 2>&1 > /dev/null + else + stat_runit "Starting folding@home" + + /opt/fah-v7/FAHClient --run-as mythtv\ + --team=50975\ + --user=${foldingusername}\ + --max-packet-size=${foldingworksize} 2>&1 > /dev/null + + fi +fi
\ No newline at end of file |