From a84dbac876c34c88b42d549114bb5b7805331aa8 Mon Sep 17 00:00:00 2001 From: skiffer-git <44203734@qq.com> Date: Thu, 22 Feb 2024 22:21:00 +0800 Subject: [PATCH] log --- scripts/stop-all.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/stop-all.sh b/scripts/stop-all.sh index ffba4c70e..fd156cc0f 100755 --- a/scripts/stop-all.sh +++ b/scripts/stop-all.sh @@ -33,7 +33,7 @@ echo -e "\n++ Stop all processes in the path ${OPENIM_OUTPUT_HOSTBIN}" openim::util::stop_services_with_name "${OPENIM_OUTPUT_HOSTBIN}" # todo OPENIM_ALL_SERVICE_LIBRARIES -sleep 1 + max_retries=15 @@ -44,9 +44,11 @@ do result=$(openim::util::check_process_names_for_stop) if [[ $? -ne 0 ]]; then - echo "+++ cat openim log file >>> ${LOG_FILE}" - openim::log::error "stop process failed. continue waiting\n" "${result}" - sleep 1 + if [[$attempt -ne 0 ]] ; then + echo "+++ cat openim log file >>> ${LOG_FILE}" + openim::log::error "stop process failed. continue waiting\n" "${result}" + fi + sleep 1 ((attempt++)) else openim::log::success "✨ All processes to be stopped"