shell 重启java 程序
#!/bin/sh jarname='test-1.0' pid=`ps aux | grep $jarname | grep -v grep | awk '{print $2}'` echo $pid kill -9 $pid nohup java -jar $jarname.jar --spring.profiles.active=test -server -Xms512m -Xmx512m > ./run.log 2>&1 & echo "start successed!!!"