I'm not sure about OS X, but I put together this little init script for my RedHat 7.2 box. You may be able to adapt it as necessary.

#!/bin/sh
#
# swiki Control the Squeak swiki
#
# chkconfig: 2345 99 10
# description: Control the Squeak swiki
#

if [ -f /etc/init.d/functions ] ; then
. /etc/init.d/functions
elif [ -f /etc/rc.d/init.d/functions ] ; then
. /etc/rc.d/init.d/functions
else
exit 0
fi

. /etc/sysconfig/network

[ ${NETWORKING} = "no" ] && exit 0

RETVAL=0

start() {
echo -n $"Starting Squeak swiki: "
/usr/local/bin/squeak -headless /home/docs/Swiki/squeak.image &
RETVAL=$?
[ $RETVAL -eq 0 ] && success $"$base startup" || failure $"$base startup"
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/swiki
return $RETVAL
}

stop() {
echo -n $"Stopping Squeak swiki"
killproc squeak
RETVAL=$?
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/swiki
echo
return $RETVAL
}

restart() {
stop
start
}

case $1 in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac

exit $?

tilo kremer wrote:

hi,
you could ssh into the box, become root and start it with
nohup ./squeak --headless squeak.image &
this way the shell's job control won't terminate the process when you log out.

greets,
tilo

Sean McKay wrote:

Thanks Jochen. One more detail...you're obviously running this with an
active login on the console, correct? Can you run it without an active
login on the console, so that administrators can log on or off without
affecting the service?

Sean


--
Jason Dufair - [EMAIL PROTECTED]
http://www.dufair.org/
"God damn the hands of glory that hold the bloody firebrand high
Close the book and end the story of how so many men have died
Let the world retain in memory that mighty tongues tell might lies,
And if mankind must have an enemy let it be his warlike pride..."
-- Bruce Cockburn


Reply via email to