1.啟動腳本start.sh 2.終止腳本stop.sh 或者查詢pid後終止 或 ...
1.啟動腳本start.sh
#run application backgroud nohup java -jar chess-admin-1.0-SNAPSHOT.jar >/dev/null 2>&1 & #record the process id echo $!>pid
2.終止腳本stop.sh
kill `cat pid`
或者查詢pid後終止
kill `jps -l | grep chess-admin | awk '{print $1}'`
或
kill `jps -l |awk '$2~"chess-admin"{print $1}'`