#!/bin/bash
# Start the jboss server.  If deploy is passed into this script
# it will run the server from the deploy directory.  Otherwise it
# will look in the $EJBAY_LOC variable for where to launch from.
#   usage: runServer <optional:server loaction>

echo $1
if [ $# == 0 ]; then
   $JBOSS_HOME/bin/run.sh -c team4
else
   if [ "$1" == "." ]; then
      $JBOSS_HOME/bin/run.sh -c team4 -Djboss.server.ejbay=$PWD/build/ejbay.jar
   else
      $JBOSS_HOME/bin/run.sh -c team4 -Djboss.server.ejbay=$1/build/ejbay.jar
   fi
fi
