From 42e2957bee44aa79dc3398e2d4bb248bc8c6aa17 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 1 Dec 2021 10:37:56 +0800 Subject: [PATCH] script --- script/docker_check_service.sh | 34 ++-------------------------------- script/docker_start_all.sh | 1 + 2 files changed, 3 insertions(+), 32 deletions(-) diff --git a/script/docker_check_service.sh b/script/docker_check_service.sh index c987f3d8b..afb1022b3 100644 --- a/script/docker_check_service.sh +++ b/script/docker_check_service.sh @@ -1,33 +1,3 @@ #!/usr/bin/env bash - -source ./style_info.cfg - -docker_compose_components=( - etcd - mongo - mysql - open_im_server - redis - kafka - zookeeper -) - -component_server_count=0 - -for ((i = 0; i < ${#docker_compose_components[*]}; i++)); do - component_server="docker-compose ps|grep -w ${docker_compose_components[$i]}|grep Up" - count="${component_server}|wc -l" - - if [ $(eval ${count}) -gt 0 ]; then - echo -e "${SKY_BLUE_PREFIX}docker-compose ${docker_compose_components[$i]} is Up!${COLOR_SUFFIX}" - let component_server_count+=1 - else - echo -e "${RED_PREFIX} ${docker_compose_components[$i]} start failed!${COLOR_SUFFIX}" - fi -done - -if [ ${component_server_count} -eq 7 ]; then - echo -e "${YELLOW_PREFIX}\ndocker-compose all services is Up!${COLOR_SUFFIX}" -else - echo -e "${RED_PREFIX}\nsome docker-compose services start failed,please check red logs on console ${COLOR_SUFFIX}" -fi +docker-compose ps +./check_all.sh diff --git a/script/docker_start_all.sh b/script/docker_start_all.sh index 5d0c19b2e..382a2c0ad 100644 --- a/script/docker_start_all.sh +++ b/script/docker_start_all.sh @@ -13,6 +13,7 @@ need_to_start_server_shell=( ) #fixme The 10 second delay to start the project is for the docker-compose one-click to start openIM when the infrastructure dependencies are not started + sleep 10 for i in ${need_to_start_server_shell[*]}; do