#! /bin/sh # ****** changed 1.10.1999 by Andy Zieler # ****** Ronny Ziegler 19.5.1999 # Script to start and stop SETI@Home # # The following values have to be changed: # SETIDIR = Path to the directory where the setiathome data are saved # NICE = Nice level that should be used for seti (the higher the value, the lower # the proirity (Values from 0 to 20 are allowed) SETIDIR="/home/andy/seti" NICE=19 # *** Lower than this point no changes are necessary # ************************************************** # # Determine the base and follow a runlevel link name. base=${0##*/} link=${base#*[SK][0-9][0-9]} rc_success="\033[71G\033[32mOK\033[m" rc_failed="\033[71G\033[31m\033[1mFehler\033[m" # Force execution if not called by a runlevel directory. test $link = $base && START_SETI="yes" test "$START_SETI" = yes || exit 0 # The echo return value for success (defined in /etc/rc.config). return=$rc_success case "$1" in start) if test -x $SETIDIR/setiathome ; then echo -e "Starting Seti-Client" cd $SETIDIR ./setiathome -nice $NICE -email || return=$rc_failed echo -e "$return" fi ;; stop) echo -n "Shutting down Seti-Client: " killall setiathome || return=$rc_failed echo -e "$return" ;; *) echo "Usage: $0 {start|stop}" exit 1 esac # Inform the caller not only verbosely and set an exit status. test "$return" = "$rc_done" || exit 1 exit 0