fixed issue #1087, support kafka docker check

This commit is contained in:
agapple
2018-11-09 13:58:39 +08:00
parent 0677443ccf
commit f9778a0aff
+4 -4
View File
@@ -76,9 +76,9 @@ function checkStart() {
function start_canal() {
echo "start canal ..."
serverPort=`perl -le 'print $ENV{"canal.port"}'`
if [ -z "$serverPort" ] ; then
serverPort=11111
metricsPort=`perl -le 'print $ENV{"canal.metrics.pull.port"}'`
if [ -z "$metricsPort" ] ; then
metricsPort=11112
fi
destination=`perl -le 'print $ENV{"canal.destinations"}'`
@@ -95,7 +95,7 @@ function start_canal() {
su admin -c 'cd /home/admin/canal-server/bin/ && sh restart.sh 1>>/tmp/start.log 2>&1'
sleep 5
#check start
checkStart "canal" "nc 127.0.0.1 $serverPort -w 1 -z | wc -l" 30
checkStart "canal" "nc 127.0.0.1 $metricsPort -w 1 -z | wc -l" 30
}
function stop_canal() {