#!/bin/sh
#
# File: es-sfix-start.sh
# Version: 1.4 01/01/09 15:43:56 
# Author: Uthaya Senthil D
#
# Copyright (c) 2000 Sun Microsystems, Inc.
#

##This script is being called from packages/Setup/es-sfix.sh only
##The JAVA_HOME variable is set in es-sfix.sh

# set required interface paths (db config file)
INTERFACE_PATH=$VAROPTDIR/cfg

# set the path for log properties file (to capture data log channels)
INTERFACE_PATH=$INTERFACE_PATH:$ESROOT/classes/base/sfix/cfg
export INTERFACE_PATH

CLASSES=$ESROOT/classes
CLASSPATH=$CLASSPATH:$CLASSES
CLASSPATH=$CLASSPATH:$CLASSES/essfx.jar
CLASSPATH=$CLASSPATH:$CLASSES/essrv.jar
CLASSPATH=$CLASSPATH:$CLASSES/esclt.jar
CLASSPATH=$CLASSPATH:$CLASSES/escom.jar
CLASSPATH=$CLASSPATH:$CLASSES/jndi/jndi.jar
CLASSPATH=$CLASSPATH:$CLASSES/jdbc/classes12.zip

# classpath for propertyfiles lookup
CLASSPATH=$CLASSPATH:$VAROPTDIR/classes
CLASSPATH=$CLASSPATH:$CLASSES/com/sun/symon/base/modules


DEFAULT=$ESROOT/modules/cfg
RECENT=$VAROPTDIR/cfg


case $# in

         0)
           $JAVA_HOME/jre/bin/java -Djava.compiler=none -DINTERFACE_PATH=$INTERFACE_PATH \
           -DDEFAULT_RI_PATH=$DEFAULT -DRECENT_RI_PATH=$RECENT \
           -classpath $CLASSPATH \
           com.sun.symon.tools.sfix.TsFixMain
           exit $?
           ;;
         1)
           $JAVA_HOME/jre/bin/java -Djava.compiler=none -DINTERFACE_PATH=$INTERFACE_PATH \
           -DDEFAULT_RI_PATH=$DEFAULT -DRECENT_RI_PATH=$RECENT \
           -classpath $CLASSPATH \
           com.sun.symon.tools.sfix.TsFixMain -C
           exit $?
           ;;
         2)
           $JAVA_HOME/jre/bin/java -Djava.compiler=none -DINTERFACE_PATH=$INTERFACE_PATH \
           -DDEFAULT_RI_PATH=$DEFAULT -DRECENT_RI_PATH=$RECENT \
           -classpath $CLASSPATH \
           com.sun.symon.tools.sfix.TsFixMain -M $2
           exit $?
           ;;
esac


