#!/bin/bash

NAME=hsmsV1-DataService

echo "service $NAME start"
echo ""

HOME=`pwd`
LOG=$HOME/logs/itsm.log
CONFS=$HOME/conf
CLASSES=$HOME/classes
LIBS=$HOME/lib
JARS=`ls $LIBS|grep .jar|awk '{print "'$LIBS'/"$0}'|tr "\n" ":"`
JAVA_OPTS=" -server -Xms10g -Xmx20g -XX:PermSize=2g -XX:SurvivorRatio=2 -XX:+UseParallelGC "
CLASS_PATH=$CONFS:$CLASSES:$JARS:$NAME

nohup java $JAVA_OPTS -classpath $CLASS_PATH com.dashitech.Application > $LOG 2>&1 &

echo ""
echo "service $NAME completed"