jenkins
执行的命令:
#!/bin/bash echo "execute shell Start" cd /usr/soft/shell/ ./stop.sh echo "execute shell Finish" BUILD_ID=dontKillMe nohup /usr/soft/shell/startup.sh &
启动的脚本:
应赋予shell目录权限,startup.sh
#!/bin/bash echo "-------starting------" cd /usr/soft/web/target chmod 777 wx-server.jar java -jar wx-server.jar &
停止脚本:stop.sh
#!/bin/bash echo "------stoping server-----" pid=`ps -ef | grep wx-server.jar | grep -v grep | awk ‘{print $2}‘` if [ -n "$pid" ];then echo "kill -9 pid:"$pid kill -9 $pid fi
相关推荐
达观数据 2020-11-11
汪康 2020-10-30
ppppfly 2020-10-24
synshitou 2020-10-21
programmeryu 2020-09-24
Topbeyond 2020-08-21
lrcoop 2020-08-18
young依然 2020-08-17
oden 2020-08-16
lrcoop 2020-08-15
yserver 2020-08-15
王永迪 2020-08-15
pursuemylife 2020-08-14
pandaphinex 2020-08-09
leonranri 2020-07-26
CloasGao 2020-07-21
zccheu 2020-07-18