标签:deploy java local post exit cts success targe err
#! /bin/sh base=/home/project/myblog cd $base git pull if [ ! $? -eq 0 ] then echo "Error in git pull!!! Stop deployment!" exit 1 fi cd $base #查看服务器状态 HTTP_CODE=`curl -o /dev/null -s -w "%{http_code}" "http://localhost"` echo "HTTP_CODE:"${HTTP_CODE}
if [ ${HTTP_CODE} -eq 200 ] then echo "server is running , began to close the server" curl -u admin:123456 -X POST http://localhost:8081/projectShutdown else echo "server is closed" fi echo "begin package the project" mvn clean package -Dmaven.test.skip=true cd $base/target echo "maven package project success, start server" java -jar myblog-0.0.1.jar
标签:deploy java local post exit cts success targe err
原文地址:http://www.cnblogs.com/laobiao/p/6654118.html