<DIV>Hey all.</DIV>
<DIV> </DIV>
<DIV>I've been attempting to convert a startup script from Redhat to work on my Debian machine but being a bit of a noob it's greek to me. Can someone help me out. It's a script to startup BOINC as a daemon as the user boinc. </DIV>
<DIV> </DIV>
<DIV>The original Redhat script is here (<A href="http://noether.vassar.edu/~myers/help/boinc/init.d-boinc">http://noether.vassar.edu/~myers/help/boinc/init.d-boinc</A>). I compared it to some standard debian scripts (atd, samba, etc) and I'm sure hacked it to pieces. The original script worked once I commented out the redhat functions line (line 20??). It was ugly and spewed error messages but it worked. Here's what I have so far in my conversion process......it doesn't work. ...sigh...</DIV>
<DIV> </DIV>
<DIV>Thanks - Tim</DIV>
<DIV> </DIV>
<DIV>#!/bin/sh<BR>#<BR># Debian GNU/Linux start/stop script to run the BOINC client as a daemon<BR># at system startup, as the boinc user (not root).<BR>#</DIV>
<DIV>PATH=/bin:/usr/bin:/sbin:/usr/sbin</DIV>
<DIV>BOINCUSER=boinc<BR>BOINCDIR=/home/boinc<BR>BUILD_ARCH=i686-pc-linux-gnu<BR>LOGFILE=boinc.log<BR>ERRORLOG=error.log<BR>BOINCOPTS="-allow_remote_gui_rpc"<BR>PIDFILE=/var/run/boinc.pid</DIV>
<DIV> </DIV>
<DIV>## Locate the working directory</DIV>
<DIV>if [ ! -d $BOINCDIR ]; then<BR> echo "Cannot find boinc directory $BOINCDIR "<BR> exit 1<BR>fi</DIV>
<DIV><BR>## Locate the executable with highest version</DIV>
<DIV>BOINCEXE=`/bin/ls -1 $BOINCDIR/boinc_*_$BUILD_ARCH 2>/dev/null | tail -n 1 `<BR>if [ ! -x "$BOINCEXE" ]; then<BR> echo "Cannot find/run boinc executable $BOINCEXE "<BR> exit 2<BR>fi</DIV>
<DIV>test -x $BOINCEXE || exit 0</DIV>
<DIV> </DIV>
<DIV>## Functions: start/stop/status/restart</DIV>
<DIV>case "$1" in<BR> start)<BR> cd $BOINCDIR<BR> if [ ! -f client_state.xml ] ; then<BR> echo -n "BOINC client requires initialization first."<BR> echo -ne "\t[FAILED]\n"<BR> echo<BR> exit 3<BR> fi</DIV>
<DIV> echo -n "Starting BOINC client as a daemon: "<BR> start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $BOINCEXE $BOINCOPTS >>$LOGFILE 2>>$ERRORLOG -- -u $BOINCUSER<BR> echo<BR> ;;</DIV>
<DIV> stop)<BR> echo -n "Stopping boinc client daemon"<BR> start-stop-daemon --stop --quiet --pidfile $PIDFILE --exec $BOINCEXE<BR> echo<BR> ;;</DIV>
<DIV> restart)<BR> $0 stop<BR> $0 start<BR> ;;</DIV>
<DIV> status)<BR> PID=`pidof $BOINCEXE`<BR> if [ "$PID" != "" ]; then<BR> echo "BOINC client is running (pid $PID)."<BR> else<BR> echo "BOINC client is stopped."<BR> fi<BR> ;;<BR> *)<BR> echo "Usage: boinc {start|stop|restart|status}"<BR> exit 1<BR>esac</DIV>
<DIV>exit</DIV>
<DIV>##<BR></DIV><p>
<hr size=1>Do you Yahoo!?<br>
Yahoo! Mail is new and improved - <a href="http://us.rd.yahoo.com/mail_us/taglines/new/*http://promotions.yahoo.com/new_mail">Check it out!</a>