jenkins发布jar包 Exec command命令
#!/bin/bashPID=`lsof -i:8081| grep LISTEN |awk '{print $2}'` //获取端口号8081的线程pidecho ${PID}export BUILD_ID=dontKillMeif [[ $PID -ge 0 ]];thenkill -9 $PIDfi//执行启动nohup /usr/local/java/jdk...
·
#!/bin/bash
PID=`lsof -i:8081| grep LISTEN |awk '{print $2}'` //获取端口号8081的线程pid
echo ${PID}
export BUILD_ID=dontKillMe
if [[ $PID -ge 0 ]];then
kill -9 $PID
fi
//执行启动
nohup /usr/local/java/jdk1.8.0_211/bin/java -jar /usr/local/workspace/order-main-1.0.0.jar > /usr/local/workspace/log/order.log 2>&1 &
更多推荐
已为社区贡献2条内容
所有评论(0)