#!/bin/sh
####
# $Id: startofbiz.sh,v 1.2 2006/06/19 08:26:23 fmota Exp $
####

# shutdown settings
ADMIN_PORT=10523
ADMIN_KEY=so3du5kasd5dn

# console log file
OFBIZ_LOG=logs/console.log

# delete the last log
rm -f $OFBIZ_LOG

# VM args
ADMIN="-Dofbiz.admin.port=$ADMIN_PORT -Dofbiz.admin.key=$ADMIN_KEY"
RDEBUG="-Xdebug -Xrunjdwp:transport=dt_socket,address=18000,server=y,suspend=n"
#DEBUG="-Dsun.rmi.server.exceptionTrace=true"
#RMIIF="-Djava.rmi.server.hostname=<set your IP address here>"
MEMIF="-Xms512M -Xmx1024M"
VMARGS="$MEMIF $RDEBUG $DEBUG $RMIIF $ADMIN"

# Worldpay Config
#VMARGS="-Xbootclasspath/p:applications/accounting/lib/cryptix.jar $VMARGS"

# location of java executable
if [ -f "$JAVA_HOME/bin/java" ]; then
  JAVA=$JAVA_HOME/bin/java
else
  JAVA=java
fi

# start ofbiz
$JAVA $VMARGS -jar ofbiz.jar $* >>$OFBIZ_LOG 2>>$OFBIZ_LOG&
#$JAVA $VMARGS -jar ofbiz.jar
exit 0

