You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
540 B
21 lines
540 B
1 year ago
|
#!/bin/bash
|
||
|
|
||
|
project=`cat env.conf | awk -F , '{print$1}'`
|
||
|
profile=`cat env.conf | awk -F , '{print$2}'`
|
||
|
|
||
|
logdir=logs
|
||
|
if [ ! -d "$logdir" ];then
|
||
|
mkdir $logdir
|
||
|
fi
|
||
|
|
||
|
targetdir=$project/target
|
||
|
jar=$project-1.0-SNAPSHOT.jar
|
||
|
|
||
|
|
||
|
|
||
|
rm -rf jar
|
||
|
mkdir jar
|
||
|
cp $targetdir/$jar jar/
|
||
|
|
||
|
java -server -Xmx1G -Xms1G -XX:+UseG1GC -XX:MaxGCPauseMillis=100 -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -verbose:gc -Xlog:gc*:logs/gc.log:time,l,tg:filecount=7,filesize=16M -jar jar/$jar --spring.profiles.active=$profile > run.log 2>&1 & echo $! > pid
|