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

View File

@@ -76,9 +76,9 @@ function checkStart() {
function start_canal() { function start_canal() {
echo "start canal ..." echo "start canal ..."
serverPort=`perl -le 'print $ENV{"canal.port"}'` metricsPort=`perl -le 'print $ENV{"canal.metrics.pull.port"}'`
if [ -z "$serverPort" ] ; then if [ -z "$metricsPort" ] ; then
serverPort=11111 metricsPort=11112
fi fi
destination=`perl -le 'print $ENV{"canal.destinations"}'` 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' su admin -c 'cd /home/admin/canal-server/bin/ && sh restart.sh 1>>/tmp/start.log 2>&1'
sleep 5 sleep 5
#check start #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() { function stop_canal() {