[root@localhost tomcat-gl-8082]# cat deploy.sh
rm -rf webapps/gl/*
rm -rf gl.war
wget -qc "http://192.168.0.102:9000/jenkins/job/gl/ws/gl.war"
echo "正在解压"
unzip gl.war -d webapps/gl >/dev/null 2>&1
cp -r /configbak/gl/* webapps/gl/WEB-INF/classes
ports="8082 8025"
for port in $ports
do
echo "killing port $port"
pid=`lsof -i:$port |awk '{print $2}' |grep -v PID`
if [ -n "$pid" ];then
kill -9 $pid
fi
done
sleep 1s
sh bin/startup.sh
tail -fn 100 logs/catalina.out
时间: 2024-10-28 04:05:55