#!/bin/sh

export basedir=/home/syjy/ipfcstV3
export producedir=$basedir/produce

export start_app_log=$basedir/logs/ipfcst_console.log

export version="3.3.1.znzx"

export app_path=$producedir/console/3.3.1.znzx

export JAVA_HOME=/home/syjy/ipfcstV3/jdk/jdk1.8.0_261
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH

export LANG="zh_CN.UTF-8"
export LC_ALL="zh_CN.UTF-8"

cd $app_path
echo "Starting console"
if test -x $app_path/ipfcst-console.jar
  then
	java -jar $app_path/ipfcst-console.jar >$start_app_log &
	echo "console started, PID is $!" | sed -e "s/\b\(.\)/\u\1/g"
  else
	echo "Couldn't find console server($app_path/ipfcst-console.jar)"
fi

exit 0
