climateprediction.net home page
Posts by old_user70993

Posts by old_user70993

1) Questions and Answers : Unix/Linux : Can't start boinc in background (Message 11905)
Posted 18 Apr 2005 by old_user70993
Post:
> I run BOINC as a cron job:
>
> # Start BOINC
> */10 * * * * cd /home/trane/boinc; ./boinc_4.19_i686-pc-linux-gnu
> 1>>./boinclog
> 2>>./boincerr
>
> Set up the job under your normal user account. It will start automatically
> regardless of whether you're logged in.
>

Another way of starting BOINC without intervention is to use an init script. You will need root access to do this. The following is the init script /etc/init.d/boinc:

#!/bin/sh
#
# BOINC init script
#
# chkconfig: 345 98 10
# description: control script for boinc
#

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

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

[ -x /boinc_4.19_i686-pc-linux-gnu ] || exit 0

# See how we were called.
case "$1" in
start)
su tzt83492 -c "cd /home/tzt83492/cp ; ./boinc_4.19_i686-pc-linux-gnu >> boinc.log 2>&1" &
;;
stop)
# Stop daemons.
killproc boinc_4.19_i686-pc-linux-gnu TERM
;;
status)
status boinc_4.19_i686-pc-linux-gnu
;;
restart)
$0 stop
$0 start
;;
reload)
$0 stop
$0 start
;;
*)
gprintf "Usage: boinc {start|stop|restart|status}\n"
exit 1
esac

exit 0

--------------------------

You will need to edit this and replace with the relevant path. Once this script is in place run chkconfig --add boinc and it will start next time the system is rebooted or when you run "/etc/init.d/boinc start"





©2024 climateprediction.net