#! /bin/sh
#
#  Run the teststand SubSystem
#

if [ `uname` == Linux ]; then FP=`readlink -fn $0`
else FP=`perl -e "use Cwd 'abs_path'; print abs_path('$0')"`; fi
BD=`dirname $FP`

if [ "$1" == jms ] || [ "$2" == jms ]; then
    TL="-tl GlassFish3"
fi

fspec=TestStand.cfg
TSCFG="-D lsst.ccs.teststand.configFile=$fspec"

ENVFL="-D lsst.ccs.teststand.envirofile=$BD/../../../../buses/src/main/resources/bnlenviro-sim.dat"

export CCS_RESOURCE_PATH=..
cd $BD/../..
CFG=ts_runtime.properties
touch $CFG
$BD/CCSbootstrap.sh -app ts $TL $TSCFG $ENVFL --description $BD/../etc/ts__lpnhe.groovy --configuration $CFG
