Rob Hudson wrote:

> So what's the best way to kill it?

The best way is:

        killall -g -INT LinFAHR9.exe

I have written an init.d script that seems to work pretty well.
It is attached.

This script is for semi-experts only.  It will automatically start
Folding@home when you boot your computer, and stop it cleanly when you
shut down.  You will have to edit it and install it correctly.

(Maybe some other semi-expert would like to write a newbie-friendly
guide to installing folding@home with this script?)

-- 
Bob Miller                              K<bob>
kbobsoft software consulting
http://kbobsoft.com                     [EMAIL PROTECTED]
#!/bin/sh
# Startup script for Folding@home.
#
# chkconfig: 2345 99 01
# description: Folding@home.  Better living through distributed computing.

# # Source function library.
# . /etc/rc.d/init.d/functions

folding_user="kbob"
folding_dir="/home/$folding_user/lib/folding@home"

[ -d "$folding_dir" ] || exit 0

case "$1" in
  start)
                echo -n  "Starting Folding@home: " 
                shopt -s nullglob
                cd "$folding_dir"
                if [ "`echo cpu*`x" != "x" ]
                then
                    for cpu in cpu*
                    do
                        cd "$folding_dir/$cpu"
                        nohup su -c './LinFAHR9.exe >& /dev/null &' $folding_user
                    done
                else
                    nohup su -c './LinFAHR9.exe >& /dev/null &' $folding_user
                fi
                ;;
        
  stop)
                echo -n "Shutting down Folding@home "
                killall -g -INT LinFAHR9.exe
                sleep 5
                echo
                ;;
        
        status)
                status folding
                ;;

        restart)
                $0 stop
                $0 start
                ;;
        
  *)
                echo "Usage: folding {start|stop|restart|status}"
                exit 1

esac

exit 0

Reply via email to