#!/bin/sh   
cd ${0%${0##*/}}.
. ./conf.sh

if [ -z "$JAVA_HOME" ]; then
  echo "The JAVA_HOME environment variable is not defined"
  echo "This environment variable is needed to run this program"
  exit 1
fi

WIFI_HOME=.

CLASSPATH=$WIFI_HOME
CLASSPATH="$CLASSPATH":"$WIFI_HOME/lib/*"



if [ "$1" = "start" ]; then
    ${JAVA_HOME}/bin/java -Xmx256m -Dlog4j.configuration=log4j_wifi_agent.properties  -Dlog.dir.path=log/ -cp $CLASSPATH bitel.billing.server.wifi.WiFiAgent $1 $2 $3 $4 $5 $6 > ./log/agent.out 2>&1 &
else
    ${JAVA_HOME}/bin/java -Xmx256m -cp $CLASSPATH bitel.billing.server.wifi.WiFiAgent $1 $2 $3 $4 $5 $6
fi
