标签:com hup int shel 目录 amp sof The startup
执行的命令:
#!/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
标签:com hup int shel 目录 amp sof The startup
原文地址:https://www.cnblogs.com/QW-lzm/p/12393175.html