Questions and Answers : Unix/Linux : Statically Compiled All CPDN/BOINC Apps for Linux
Message board moderation
Previous · 1 · 2
Author | Message |
---|---|
Send message Joined: 5 Aug 04 Posts: 1120 Credit: 17,202,915 RAC: 2,154 |
> > If you shut the client down, and then restart it after the 24 hours has > passed > > since the last rejection then it will download work immediately. And for > that > > you could run it not in the background. > > > I did manage to do that, but it is very peculiar. When I run the boinc client > in the foreground while logged in as boinc, it seems to run: two instances of > climateprediction and two instances of setiathome. setiathome is silent, but > clientprediction prints stuff like this: > > 23mc_100119001 - PH 1 TS 000383 - 08/12/1810 23:30 - H:M:S=0000:25:22 AVG= > 3.97 DLT= 0.98 > I suppose this is correct. > > So I infer that my script in /etc/rc.d/init.d is not correct, though I started > with something I got from one of the boinc sites. That script did not run > right (the BOINC client exitted almost instantly, so I modified it to work > with setiathome and predictor. But climatepredicition did not work, I see.). > I now have it working and it is running two instances of climateprediction and two of setiathome. I guess it is OK now. The script now looks like this, in case anyone cares; it is not ideal, but it works. #!/bin/bash # # Red Hat Linux start/stop script to run the BOINC client in background # at system startup, as the boinc user (not root). # # chkconfig: 345 71 29 # description: start boinc client at boot time # processname: boinc # config: /etc/sysconfig/boinc # # Eric Myers - 27 July 2004 # Department of Physics and Astronomy, Vassar College, Poughkeepsie NY # @(#) $Revision: 1.5 $ -- $Date: 2004/07/27 14:43:24 $ declare -i CLIENT_PID PATH=/sbin:/bin:/usr/sbin:/usr/bin export PATH # Source function library. . /etc/rc.d/init.d/functions # Defaults, which can be overridden by /etc/sysconfig/boinc BOINCUSER=boinc BOINCDIR=/home/boinc BUILD_ARCH=i686-pc-linux-gnu LOGFILE=boinc.log ERRORLOG=error.log if [ -f /etc/sysconfig/boinc ]; then . /etc/sysconfig/boinc fi ## Locate the working directory if [ ! -d $BOINCDIR ]; then echo "Cannot find boinc directory $BOINCDIR " exit 1 fi ## Locate the executable with highest version BOINCEXE=`/bin/ls -1 $BOINCDIR/boinc_*_$BUILD_ARCH 2>/dev/null | tail -n 1 ` if [ ! -x "$BOINCEXE" ]; then echo "Cannot find/run boinc executable $BOINCEXE " exit 2 fi ## Functions: start/stop/status/restart case "$1" in start) cd $BOINCDIR if [ ! -f client_state.xml ] ; then echo -n "BOINC client requires initialization first." echo_failure echo exit 3 fi echo -n "Starting BOINC client: " su - boinc -c "$BOINCEXE >>$BOINCDIR/$LOGFILE 2>>$BOINCDIR/$ERRORLOG &" echo ;; stop) killproc $BOINCEXE && echo_success || echo_failure echo ;; restart) $0 stop $0 start ;; status) PID=`pidof $BOINCEXE` if [ "$PID" != "" ]; then echo "BOINC client is running (pid $PID)." else echo "BOINC client is stopped." fi ;; *) echo "Usage: boinc {start|stop|restart|status}" exit 1 esac exit ## |
©2024 cpdn.org