#! /bin/bash

APP_ROOT_DIR=/home/gmt/app
NAME_SERVICE=EyeAPN_AsdeRecv
NAME_JAR=EyeAPN_AsdeRecv.jar
NAME_PID=./application.pid

PATH_EXE_ROOT=$APP_ROOT_DIR/$NAME_SERVICE
PATH_EXE_JAR=$PATH_EXE_ROOT/$NAME_JAR
PATH_CONFIG=$PATH_EXE_ROOT/cfg

OPT_JAVA="-Dfile.encoding=UTF-8 -Dlogging.config=$PATH_CONFIG/logback-spring.xml"
OPT_SPRING="--spring.config.location=file:$PATH_CONFIG/application.yml"

cd $PATH_EXE_ROOT

echo java -jar $OPT_JAVA $PATH_EXE_JAR $OPT_SPRING

java -jar $OPT_JAVA $PATH_EXE_JAR $OPT_SPRING