Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Mac OS X Hints -' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Mac OS X Hints -
Authored by: cyber.sonik on Aug 22, '01 03:55:33PM
I also wanted to run the CLI version of Seti@HOME but decided to use the StartupItems mechanism as found in OS X System Overview. At boot it gets launched and then cron isn't always trying to re-launch it. Here's what I did (as root): create the folder "StartupItems" in
/Library, create a folder named "SetiAtHome" in it, and then a file of the same name in that folder. Also, you need a StartupParameters.plist file in this folder. I placed the Seti@HOME
files in a "bin" folder in the "SetiAtHome" folder to make the whole thing portable.

Hierarchy:
/Library/StartupItems/
/Library/StartupItems/SetiAtHome/
/Library/StartupItems/SetiAtHome/SetiAtHome*
/Library/StartupItems/SetiAtHome/StartupParameters.plist
/Library/StartupItems/SetiAtHome/bin/
/Library/StartupItems/SetiAtHome/bin/README
/Library/StartupItems/SetiAtHome/bin/setiathome*

Files:
/Library/StartupItems/SetiAtHome/SetiAtHome
#!/bin/sh


##
# Start Seti@Home
##

. /etc/rc.common

if [ "${SETIATHOME:=-NO-}" = "-YES-" ]; then
ConsoleMessage "Starting SETI@home"

cd /Library/StartupItems/SetiAtHome/bin; ./setiathome -email -nice 19 > /dev/null 2> /dev/null &
fi

/Library/StartupItems/SetiAtHome/StartupParameters.plist
{

Description = "SETI@home CLI program";
Provides = ("SETI@home");
Requires = ("Disks");
Uses = ("Resolver");
OrderPreference = "Late";
Messages =
{
start = "Starting SETI@home";
stop = "Stopping SETI@home";
};
}


The first file needs to be made executable (chmod a+x), the line SETIATHOME=-YES- in
/etc/hostconfig toggles it on and off, and setiathome needs to be run once to set it up. I
hope this helps


[ Reply to This | # ]
Mac OS X Hints -
Authored by: wallyfoo on Aug 22, '01 04:33:12PM

You should bottle this and sell it, so to speak.

That's a great tip. What does the seti@home group say about bundling distros? Make a little install package with this setup and there'd be a ton of people grateful, I'm sure.

Thanks so much.



[ Reply to This | # ]
Mac OS X Hints -
Authored by: Hes Nikke on Dec 21, '01 09:33:02PM

in a worst case senerio one could make a shell script that does this :)

psudocode:

if script is run as root/sudo

...make directory /Library/StartupItems/SetiAtHome/
...make directory /Library/StartupItems/SetiAtHome/bin/

...copy SetiAtHome from package to /Library/StartupItems/SetiAtHome/SetiAtHome
...copy StartupParameters.plist from package to /Library/StartupItems/SetiAtHome/StartupParameters.plist

...chmod /Library/StartupItems/SetiAtHome/SetiAtHome if nessary

...download SAH
...unpack SAH to /Library/StartupItems/SetiAtHome/bin/

...run SAH with the stop after download switch

else
...output that this needs to be run as root/sudo

and there we go!

anyone wanna make the shell script?



[ Reply to This | # ]
Mac OS X Hints -
Authored by: Hes Nikke on Dec 22, '01 02:18:17AM
ok, this should do it, requires wget (use fink)
sah installer
run tar -xvf sah.tar
in the sah folder, run ./install.sah
enjoy! :)

if this doesn't work right, email me, this isn't tested, i've got a diffrent implimentation of SAH on 3 machines!

[ Reply to This | # ]
Mac OS X Hints -
Authored by: Hes Nikke on Aug 05, '03 07:14:02PM
wow some time in the past 2 years the above linked file got moved! well, since i was fixing the URL, i figured i'd go the whole 9 yards, and make sure that the script actually works (and it does) enjoy :D

---
vacuums do not suck. they merely provide an absence that allows other objects to take the place of what becomes absent.

[ Reply to This | # ]