DIR="$( cd "$( dirname "$0"  )" && pwd  )"
time=$(date "+%Y%m%d-%H%M%S")
cd $DIR
echo $DIR
#kill 进程
PID=$(pgrep -a java|grep jiliason-admin|awk '{print $1}')
if [ $PID ]
then
        kill -9 ${PID}
        echo 'killing jiliason-admin process!'
else
        echo 'jiliason-admin process not exist!'
fi
#检查进程是否关闭正常
var=$(pgrep -a java|grep jiliason-admin|awk '{print $1}')
if [ $var ]
then
        echo 'jiliason-admin closure exception!'
else
        echo 'jiliason-admin shutdown ok!'
fi
#启动进程
nohup java -jar -Dlogging.config=./logback.xml jiliason-admin.jar > nohup.out 2>&1 &