HOWTO: Starting SETI when Linux Starts

Permabanned
Joined
18 Oct 2002
Posts
2,010
Location
Huddersfield / Antartica
Hiyas,

Add the following script into your /etc/init.d/ substituting /home/shak/seti1 for your SETI directory:

Code:
#!/sbin/runscript
 checkconfig() {
         if [ ! -e /home/shak/seti1 ]
         then
                einfo "Creating /home/shak/seti1"
                 mkdir /home/shak/seti1
         fi
         if [ ! -e /home/shak/seti1/user_info.sah ]
      then
                 einfo "Setting up SETI@home for the first time"
                 cd ${SETIATHOME_DIR}
                 ./setiathome -login
         fi
 }
 start() {
         checkconfig
        ebegin "Starting SETI@home"
         cd /home/shak/seti1
         ./setiathome -nolock -proxy croccomp.no-ip.com:5517 >&/dev/null&
         eend $?
 }
 stop() {
       ebegin "Stopping SETI@home"
         killall setiathome
         eend $?
 }

You can also swap the S@H arguments on the end.

Then add this to the startup by adding

Code:
/etc/init.d/setiathome start

To /etc/conf.d/local.start

There may be some slight differences for different distros for the local.start and the /etc/init.d

Shak
 
Originally posted by Pho
Cool thanks, if you have two seti processes running on a 1 processor machine does it affect anything at all?

This script starts 1 process, for a 2 processor one you have to have another script called seti2 :)

exedanni: It could be cleaner but TBH I was just coding it for me to start with, and found that SETIDIR didnt work because it defines it as Gentoo's SETI dir /opt/setiathome where mine isnt there.

Shak
 
uhuh! But it would be better if it was a GUI file to use the KDE startup scripts.

Add it to /home/dezyboy/.kde/autostart or add use it through the control panel, where there should be an autostart bit.

Alternativelty, just save the current session and then it will use that every time :p

Shak
 
Back
Top Bottom