Questions and Answers :
Unix/Linux :
BOINC service on Linux/Unix
Message board moderation
Author | Message |
---|---|
Autolycus Send message Joined: 26 Jan 02 Posts: 2 Credit: 2,600,514 RAC: 0 |
Has anyone written an init script for Boinc yet? If so, can you share it's location. Thanks Jon |
crunchenstein Send message Joined: 3 Apr 99 Posts: 5 Credit: 32,140,314 RAC: 0 |
This page has some add on's including startup scripts http://www.boinc.dk/index.php?page=mirror_file_list |
Autolycus Send message Joined: 26 Jan 02 Posts: 2 Credit: 2,600,514 RAC: 0 |
Thank you...I also am going to post here what I used so that others may gain from it. I modified the generic CHKCONFIG script I was using for seti 3.08 so that it would run my setiboinc. #!/bin/bash # chkconfig: 35 90 15 # description: Starts and Stops the SETI BOINC service # Source function librairy . /etc/rc.d/init.d/functions ################################################ #This script is a sample script to allow the seti #client to run as a service on a linux box. # #Install Notes : # # customize the two first variables of the script # make a symbolic link from # You have to link /etc/rc.d/rc./S99seti # to this file to make it run. # start the service (or reboot :-) ) # check it works with the status option # # #How this works ? # #When using the script, your seti client will always #run in the same folder (that you can choose) , #this is a "clean" way to run it. #The service can be: # -launched with "/etc/rc.d/initd/seti start" # -stoped with "/etc/rc.d/initd/seti stop" # -restarted with "/etc/rc.d/initd/seti restart" # -watched with "/etc/rc.d/initd/seti status" # -be logged with "/etc/rc.d/initd/seti log" #As the last option (log) in quite unsual, #it is intended to be used with the cron daemon #to allow users to log their progress in some file #so that can get a good idea of there current score #and progress. #Here are the 2 lines to type in your crontab : # SHELL=/bin/bash # 30 0 * * * "/etc/rc.d/initd/seti log" #You must have write permission on all the files #to add it to your crontab. #Author Stephane NICOLAS # #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=/seti #This direcory contains the root of setiathome's workspace #you can customize it. SETI_DIR=/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=/seti/lock.sah 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}/setiboinc.sh & touch $SETI_LOCK_FILE ;; stop) echo -n "Shutting down seti: " more ${SETI_DIR}/user_info.sah | awk -F = ' $1 == "nresults" { print $2 }' killall setiboinc killall setiboinc.sh 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 |
©2024 University of California
SETI@home and Astropulse are funded by grants from the National Science Foundation, NASA, and donations from SETI@home volunteers. AstroPulse is funded in part by the NSF through grant AST-0307956.