Match the status code (#21225)

Signed-off-by: muicoder <muicoder@gmail.com>
This commit is contained in:
muicoder 2023-05-10 11:44:56 +08:00 committed by GitHub
parent b1b85c3d95
commit ac0ac18cc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -55,7 +55,7 @@ else
exit $?
fi
while true; do
es=$(taos -h $FIRST_EP_HOST -P $FIRST_EP_PORT --check)
es=$(taos -h $FIRST_EP_HOST -P $FIRST_EP_PORT --check | grep "^[0-9]*:")
echo ${es}
if [ "${es%%:*}" -eq 2 ]; then
echo "execute create dnode"

View File

@ -1,5 +1,5 @@
#!/bin/sh
es=$(taos --check)
es=$(taos --check | grep "^[0-9]*:")
code=${es%%:*}
if [ "$code" -ne "0" ] && [ "$code" -ne "4" ]; then
exit 0