shutdown.sh

#!/bin/bash
echo "Stopping sys-pay"
pid=`ps -ef|grep majiameng-0.0.1-SNAPSHOT.jar|grep -v grep|awk '{print $2}'`
if [ -n "$pid" ]
then
   echo "kill -9 的pid:" $pid
   kill -9 $pid
fi

start.sh

#!/bin/bash
cp /root/.jenkins/workspace/test/target/majiameng-0.0.1-SNAPSHOT.jar /home1/wwwroot/test
BUILD_ID=dontKillMe nohup java -jar majiameng-0.0.1-SNAPSHOT.jar  >/home1/logs/test.log 2>&1 &
Last modification:March 24th, 2020 at 12:05 am
如果觉得我的文章对你有用,请随意赞赏