Hi,

A while back some kind people helped with writing a script to start my Swiki
on boot (btw I'm using one of those headless Cobalt Linux appliances). The
script works fine, but NOT ON BOOT; I seem to have missed a step. Any
Unix/Linux sys admins on the list have any ideas what I still need to do.

Here is the script:

#!/bin/sh
. /etc/rc.d/init.d/functions
SQUEAKDIR=/opt/ComSwiki
SWPARAM="-headless -memory 40m"
SWIKIVM=$SQUEAKDIR/skweak
case "$1" in
    start)
        echo Starting Swiki
        cd $SQUEAKDIR/
        nohup $SWIKIVM $SWPARAM skweak.image &
        ;;
    stop)
        echo -n Killing Swiki
        killproc $SWIKIVM
        echo
        ;;
    restart)
        $0 stop;$0 start
        ;;
    *)
        echo "Usage: $0 {start|stop|restart}"
        exit 1
esac
exit 0

It is saved here: /etc/rc.d/init.d

In addition, I'm having problems wrapping my head around the scripts for
auto-restart in case of server crash. While I haven't yet needed such a
script, I am about to go to an unwired part of Greece for a month; the Swiki
has to stay live without my direct intervention. Can some one give me a
dummies tutorial on how to set this up?

Thank you,

John

Reply via email to