github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/dm/tests/upstream_switch/init.sh (about) 1 #!/bin/sh 2 3 # call the MySQL image provided entrypoint script 4 # "$@" is to pass all parameters as they are provided 5 /entrypoint.sh "$@" & 6 7 i=0 8 while [ "$(netstat -na | grep "LISTEN" | grep "3306" | wc -l)" -eq 0 ]; do 9 echo "wait mysql" 10 i=$((i + 1)) 11 if [ "$i" -gt 100 ]; then 12 echo "wait for mysql timeout" 13 exit 1 14 fi 15 sleep 1 16 done 17 18 service keepalived start 19 20 tail -f /dev/null