On Tue, 12 Feb 2002, John Voiklis wrote:
> Hi,
>
> I would like to start up Comswiki when my machine boots. I have tried and
> failed to write a startup script. Could someone provide a sample of one they
> use?
#!/bin/sh
. /etc/rc.d/init.d/functions
SQUEAKDIR=$HOME/Squeak
VMDIR=$SQUEAKDIR/ServerVM
VMPARA="-notitle -display unix:1"
PWSVM=$VMDIR/squeakswiki
COMVM=$VMDIR/squeakcomanche
case "$1" in
start)
echo Starting VNC server
vncserver -kill :1 >/dev/null 2>&1
rm -rf /tmp/.X11-unix/X1
vncserver :1 -name Squeak -geometry 800x600 -depth 8 -cc 3
(
unset SQUEAK_SECURE
LD_LIBRARY_PATH=$VMDIR
export LD_LIBRARY_PATH
echo Starting PWS
cd $SQUEAKDIR/Swiki
nohup $PWSVM $VMPARA swiki.image &
echo Starting Comanche
cd $SQUEAKDIR/Comanche
nohup $COMVM $VMPARA comanche.image &
)
;;
stop)
echo -n Killing PWS
killproc $PWSVM
echo
echo -n Killing Comanche
killproc $COMVM
echo
vncserver -kill :1
;;
restart)
$0 stop;$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0