diff options
Diffstat (limited to 'abs/extra-testing/community/foldingathome/foldingathome.install')
-rw-r--r--[-rwxr-xr-x] | abs/extra-testing/community/foldingathome/foldingathome.install | 61 |
1 files changed, 39 insertions, 22 deletions
diff --git a/abs/extra-testing/community/foldingathome/foldingathome.install b/abs/extra-testing/community/foldingathome/foldingathome.install index 8eedb6c..20e48d1 100755..100644 --- a/abs/extra-testing/community/foldingathome/foldingathome.install +++ b/abs/extra-testing/community/foldingathome/foldingathome.install @@ -1,30 +1,47 @@ -# 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 - - --> 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." + # Check for an R5.5 fah installation. + r5_fah_dir=/myth/folding@home + r6_fah_dir=/myth/foldingathome/$(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 + --> The directroy used on R6 will be: + --> $r6_fah_dir EOM -} + else + mkdir -p /myth/foldingathome + mv $r5_fah_dir $r6_fah_dir + fi + else + if [ ! -d "$r6_fah_dir" ] ; then + mkdir -p $r6_fah_dir + cat > $r6_fah_dir/client.cfg << 'EOM' +[settings] +username=LinHES +team=50975 +passkey= +asknet=no +bigpackets=normal +machineid=1 -# arg 1: the new package version -# arg 2: the old package version -post_upgrade() { - post_install $1 +[http] +active=no +host=localhost +port=8080 +EOM + fi + fi + rm -fr $r6_fah_dir/index.html + ln -s $r6_fah_dir/MyFolding.html $r6_fah_dir/index.html + ln -s $r6_fah_dir /data/srv/httpd/htdocs/foldingathome + /sbin/add_service.sh fah } -# arg 1: the old package version pre_remove() { - /bin/true + sv stop fah + /sbin/remove_service.sh fah } -op=$1 -shift - -$op $* |