Commit 8e340e20 authored by 白秀江's avatar 白秀江

Add new file

parent a907b260
#!/bin/bash
cd `dirname $0`
BIN_DIR=`pwd`
DEPLOY_DIR=`pwd`
./restart.sh
COUNT=0
TIMES=0
while [ $COUNT -lt 1 ]; do
echo -e ".\c"
sleep 1
if [ -n "$SERVER_PORT" ]; then
if [ "$SERVER_PROTOCOL" == "dubbo1" ]; then
COUNT=`echo status | nc -i 1 127.0.0.1 $SERVER_PORT | grep -c OK`
else
COUNT=`netstat -lnp | grep $SERVER_PORT | wc -l`
fi
else
COUNT=`ps -f | grep java | grep "$DEPLOY_DIR" | awk '{print $2}' | wc -l`
fi
if [ $COUNT -gt 0 ]; then
break
fi
let $TIMES=$TIMES+1
if [ $TIMES -gt 20 ]; then
break
fi
done
\ No newline at end of file
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