#!/bin/sh
cd /home/code/learnBoot
svn up
gradle build
ps -ef | grep learnBoot- | grep -v grep | cut -c 9-15 | xargs kill -s 9
mv -f /home/project/learnBoot-0.1.jar /home/project/learnBoot-0.1.jar_bak
cp -f /home/code/learnBoot/build/libs/learnBoot-0.1.jar /home/project/learnBoot-0.1.jar
mv -f /home/project/nohup.out /home/project/nohup.out_bak
nohup java -jar /home/project/learnBoot-0.1.jar --SERVER.PORT=17000 --spring.profiles.active=prod >/home/project/nohup.out &
sleep 3
tail /home/project/nohup.out