Commit e94ef60e authored by 白秀江's avatar 白秀江

更新project-deploy.sh

parent 517c70c4
......@@ -2,14 +2,26 @@
cd `dirname $0`
BIN_DIR=`pwd`
DEPLOY_DIR=`pwd`
$1/restart.sh
COUNT=0
TIMES=0
while [ $COUNT -lt 1 ]; do
case $1 in
deploy)
deploy $*
;;
*)
echo "error"
esac
function deploy() {
$2/restart.sh
COUNT=0
TIMES=0
while [ $COUNT -lt 1 ]; do
echo -e ".\c"
sleep 1
COUNT=`curl -v $2 | grep "success" | wc -l`
COUNT=`curl -v $3 | grep "success" | wc -l`
if [ $COUNT -gt 0 ]; then
break
fi
......@@ -17,4 +29,5 @@ while [ $COUNT -lt 1 ]; do
if [ $TIMES -gt 200 ]; then
exit 1
fi
done
\ No newline at end of file
done
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment