mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
fixed docker build
This commit is contained in:
@@ -86,7 +86,9 @@ function start_canal() {
|
||||
echo "multi destination:$destination is not support"
|
||||
exit 1;
|
||||
else
|
||||
mv /home/admin/canal-server/conf/example /home/admin/canal-server/conf/$destination
|
||||
if [ "$destination" != "" ] && [ "$destination" != "example" ] ; then
|
||||
mv /home/admin/canal-server/conf/example /home/admin/canal-server/conf/$destination
|
||||
fi
|
||||
fi
|
||||
su admin -c 'cd /home/admin/canal-server/bin/ && sh restart.sh 1>>/tmp/start.log 2>&1'
|
||||
sleep 5
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
#!/bin/sh
|
||||
CHECK_URL="http://127.0.0.1:8080/metrics"
|
||||
CHECK_POINT="success"
|
||||
metrics_port=`perl -le 'print $ENV{"canal.metrics.pull.port"}'`
|
||||
if [ "$metrics_port" == "" ]; then
|
||||
metrics_port="11112"
|
||||
fi
|
||||
|
||||
CHECK_URL="http://127.0.0.1:$metrics_port/metrics"
|
||||
CHECK_POINT="canal"
|
||||
CHECK_COUNT=`curl -s --connect-timeout 7 --max-time 7 $CHECK_URL | grep -c $CHECK_POINT`
|
||||
if [ $CHECK_COUNT -eq 0 ]; then
|
||||
echo "[FAILED]"
|
||||
|
||||
Reference in New Issue
Block a user