From 078ed80050f2999bb4e46b39332931fe7981ab39 Mon Sep 17 00:00:00 2001 From: luhaoling <2198702716@qq.com> Date: Tue, 20 Feb 2024 09:56:25 +0800 Subject: [PATCH] fix: fix the error --- scripts/check-all-by-signal.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/check-all-by-signal.sh b/scripts/check-all-by-signal.sh index ba8695cfa..db03e60fa 100644 --- a/scripts/check-all-by-signal.sh +++ b/scripts/check-all-by-signal.sh @@ -40,15 +40,15 @@ trap handle_error ERR . $(dirname ${BASH_SOURCE})/install/openim-msgtransfer.sh openim::msgtransfer::check_by_signal -# Assuming openim::util::check_ports_by_signal function sets a proper exit status -# based on whether services are running or not. -if openim::util::check_ports_by_signal ${OPENIM_SERVER_PORT_LISTARIES[@]}; then - echo "+++ cat openim log file >>> ${LOG_FILE}" - openim::log::error_exit "The service does not stop properly, there are still processes running, please check!" -else +openim::util::check_ports_by_signal ${OPENIM_SERVER_PORT_LISTARIES[@]} +if [[ $? -ne 0 ]]; then echo "++++ All openim service ports stop successfully !" +else + echo "+++ cat openim log file >>> ${LOG_FILE}" + openim::log::error_exit "The service does not stop properly, there are still processes running, please check!" fi + set -e trap - ERR \ No newline at end of file