重启jar包
bash#!/bin/sh jarname='demo' pid=`ps aux | grep $jarname | grep -v grep | awk '{print $2}'` echo $pid kill -9 $pid nohup java -jar $jarname.jar --spring.profiles.active=prod &
bash#!/bin/sh jarname='demo' pid=`ps aux | grep $jarname | grep -v grep | awk '{print $2}'` echo $pid kill -9 $pid nohup java -jar $jarname.jar --spring.profiles.active=prod &
共有评论 0 条