Re: seti service script - proper run level (still problems)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Moved my smb link to rc3 and still having problems. Messages shows the following

Apr 21 16:59:44 gold seti: Starting computing seti:
Apr 21 16:59:44 gold seti: 3133
Apr 21 16:59:45 gold seti: SETI@home client.
Apr 21 16:59:45 gold seti: Platform: i386-pc-linux-gnulibc1-static
Apr 21 16:59:45 gold seti: Version: 3.03
Apr 21 16:59:45 gold rc: Starting seti:  succeeded

But nothing is actually running. Once again, run from init.d manually all is fine.

Here is the script, less extra comments. Is there any way I can look at all this more closely, and find the problem?

#Author Stephane NICOLAS
#<snicolas@xxxxxxxxxxxxxxxxx>
#This program is distributed under the terms of the GPL.
#You can get a copy of it at
#http://www.fsf.org/copyleft/copyleft.html#translations

#This variable points to the client's executable directory
#change this value to define the location of your client.
#We do NOT need the client to be in your $PATH
SETI_CLIENT_DIR=/home/user/seti

#This direcory contains the root of setiathome's workspace
#you can customize it.
SETI_DIR=/home/user/seti

#This file is generated by setiathome and we need it
SETI_LOG_FILE=$SETI_DIR/state.sah

#this file is lock file we create to ensure one and
#only one client is launched
SETI_LOCK_FILE=/var/lock/seti

case "$1" in
start)
echo -n "Starting computing seti: "
more ${SETI_DIR}/user_info.sah | awk -F = '$1 == "nresults" { print $2}'
cd $SETI_DIR
${SETI_CLIENT_DIR}/setiathome & touch $SETI_LOCK_FILE
;;


stop)
echo -n "Shutting down seti: "
more ${SETI_DIR}/user_info.sah | awk -F = ' $1 == "nresults" { print $2 }'
killall setiathome
rm -f $SETI_LOCK_FILE
echo ;;


  restart)
  $0 stop
  $0 start
  ;;

status)
echo -n "Seti work unit completed: "
more ${SETI_DIR}/user_info.sah | awk -F = ' $1 == "nresults" { print $2}'
running=`ps -A | grep setiathome`
#thanks to Toan for this bug fix
if( [ "${running}" = " " ] )
then
echo "Seti client is not running."
else
echo -n "Seti client runs since "
echo ${running} | awk -F " " '{ print $3 }'
echo -n "The current work unit is completed at "
more $SETI_LOG_FILE | grep prog | awk -F "=" '{ print $2 } '
fi
echo -n "Last result returned at ("
more /var/log/seti/user_info.sah | grep last_result_time | awk -F "(" '{ print $2 }'
echo ""
;;
log)
/bin/date >> $SETI_DIR/log
$0 status >> $SETI_DIR/log
echo "*******************************************" >> $SETI_DIR/log
;;


  *)
   echo "Usage: seti {start|stop|restart|status}"
   exit 1
esac

Alexander Dalloz wrote:

Am Di, den 20.04.2004 schrieb Kevin F. Berrien um 19:10:



I run seti client on my internal fedora test boxes, as they sit ide most of the time.
After upgrading these boxes from RH9, I've decided to finally run my clients as services.


Found a good script on the net, works great from init.d manually.

I dropped the script S99seti into rc.d4, and it executes at bootup, but doesn't work.



You speak of /etc/rc4.d/?



Suggestions? Which run level should I be using? Is it ok to put a symb. link in the rc.d directories?



Please look at /etc/inittab to see which runlevel is for which purpose. You'll see that runlevel 4 is not used. So either use runlevel 3 or 5. Make your init script chkconfig compatible and you are able to create and delete the runlevel symlinks using the chkconfig tool, see

/usr/share/doc/initscripts-7.42.2/sysvinitfiles

Alexander







[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux