Listing of Source startserver.sh#!/bin/sh
# NetPhantom Startup script
COMMAND='java -ms128m -mx128m -classpath .:NetPhantomServer.jar:NetRexxR.jar:NetRexxC.jar:bcprov.jar:openxml-1.2-np.jar:mail.jar se.entra.phantom.server.Start restart'
RSTCMD='java -ms32m -mx32m -classpath . UpgradeNetPhantomServer'
echo "*** Starting the NetPhantom Server ***"
PW=`dirname $0`
while true
do
cd $PW;$COMMAND
RC=$?
if [ $RC -eq 1000 ] || [ $RC -eq 232 ]; then
echo "*** Restarting the NetPhantom Server ***"
elif [ $RC -eq 1001 ] || [ $RC -eq 233 ]; then
echo "*** Upgrading the NetPhantom Server ***"
$RSTCMD > upgrade.log
if [ $? != 0 ]; then
echo "*** Error when upgrading the NetPhantom Server ***"
exit 1
fi
echo "*** Restarting the NetPhantom Server after upgrade ***"
elif [ $RC -eq 0 ]; then
echo "*** The Server has been stopped normally ***"
exit 0
else
echo "*** Error when starting or restarting the NetPhantom Server ***"
exit 1
fi
done