2018-08-06

2018-08-06  本文已影响0人  Eille2018

#!/bin/bash

cp -rf  dist /home/liuzhoutielong/apache-tomcat-9.0.2/webapps

cd /home/liuzhoutielong/lZTLproject/Dist2.0

time=$(date +%H%M%S)

echo "$time"

mkdir $time

cp -rf  /home/liuzhoutielong/Jenkins/workspace/Dist2.0/dist  /home/liuzhoutielong/lZTLproject/Dist2.0/$time

exit

#!/bin/bash

#!/bin/bash -ilex

time=$(date +%H%M%S)

echo "Stopping GovScenePM"

pid=`ps -ef | grep GovScenePM-2.0-test.jar | grep -v grep | awk '{print $2}'`

if [ -n "$pid" ]

then

  echo "kill -9 的pid:" $pid

  kill -9 $pid

fi

echo "Stopped GovScenePM"

./replace.sh

echo "replace GovScenePM"

echo "waiting "

echo "waiting "

echo "waiting "

echo "waiting "

replace.sh

#!/bin/bash

time=$(date +%H%M%S)

cp /home/liuzhoutielong/Jenkins/workspace/GovScenePM2.0/target/GovScenePM-2.0-test.jar  /home/liuzhoutielong/lZTLproject/GovScenePM2.0/

echo "copy GovScenePM"

cp /home/liuzhoutielong/Jenkins/workspace/GovScenePM2.0/target/GovScenePM-2.0-test.jar  /home/liuzhoutielong/lZTLproject/GovScenePM2.0/"GovScenePM-2.0"$time".jar"

start

#!/bin/bash -ilex

java -jar /home/liuzhoutielong/lZTLproject/GovScenePM2.0/GovScenePM-2.0-test.jar >> /home/liuzhoutielong/lZTLproject/GovScenePM2.0/GovScenePM.log 2>&1 &

上一篇下一篇

猜你喜欢

热点阅读