summaryrefslogtreecommitdiffstats
path: root/abs/extra-testing/community/foldingathome/foldingathome.install
diff options
context:
space:
mode:
Diffstat (limited to 'abs/extra-testing/community/foldingathome/foldingathome.install')
-rw-r--r--[-rwxr-xr-x]abs/extra-testing/community/foldingathome/foldingathome.install56
1 files changed, 35 insertions, 21 deletions
diff --git a/abs/extra-testing/community/foldingathome/foldingathome.install b/abs/extra-testing/community/foldingathome/foldingathome.install
index 8eedb6c..3ecc7c9 100755..100644
--- a/abs/extra-testing/community/foldingathome/foldingathome.install
+++ b/abs/extra-testing/community/foldingathome/foldingathome.install
@@ -1,30 +1,44 @@
-# arg 1: the new package version
post_install() {
- cat << 'EOM'
- --> Please cd to /opt/fah/ and execute ./fah6 -smp -configonly
- --> to configure your settings. Then add "foldingathome" to the list
- --> of daemons in /etc/rc.conf. If you would like to join the Arch
- --> Linux team, use team number 45032. To check current progress,
- --> point your browser to file://opt/fah/MyFolding.html
+ # Check for an R5.5 fah installation.
+ r5_fah_dir=/myth/folding@home
+ r6_fah_dir=/myth/folding_$(hostname)
+ if [ -d "$r5_fah_dir" ] ; then
+ if [ -d "$r6_fah_dir" ] ; then
+ cat << 'EOM'
+ --> You have an R5.5 and an R6 folding directory at the same time!
+ --> you should manually delete the R5.5 directory:
+ --> $r5_fah_dir
+EOM
+ else
+ mv $r5_fah_dir $r6_fah_dir
+ fi
+ else
+ if [ ! -d "$r6_fah_dir" ] ; then
+ mkdir $r6_fah_dir
+ cat > $r6_fah_dir/client.cfg << 'EOM'
+[settings]
+username=LinHES
+team=50975
+passkey=
+asknet=no
+bigpackets=normal
+machineid=1
- --> It is strongly recommended that you run foldingathome as a user other
- --> than root. You can identify a user in /etc/conf.d/foldingathome.
- --> A directory called /opt/fah/$FAH_USER will be created."
+[http]
+active=no
+host=localhost
+port=8080
EOM
-}
+ fi
+ fi
-# arg 1: the new package version
-# arg 2: the old package version
-post_upgrade() {
- post_install $1
+ /sbin/add_service.sh fah
+ sleep 5
+ /sbin/sv -v start fah
}
-# arg 1: the old package version
pre_remove() {
- /bin/true
+ /sbin/sv stop fah
+ /sbin/remove_service.sh fah
}
-op=$1
-shift
-
-$op $*