From 8e4836f6f9410837e4785633283b776443949fe3 Mon Sep 17 00:00:00 2001 From: luhaoling <2198702716@qq.com> Date: Tue, 20 Feb 2024 19:52:25 +0800 Subject: [PATCH] fix: fix the make stop script --- scripts/check-all-by-signal.sh | 41 ---------------------------------- scripts/stop-all.sh | 8 ++++++- 2 files changed, 7 insertions(+), 42 deletions(-) delete mode 100644 scripts/check-all-by-signal.sh diff --git a/scripts/check-all-by-signal.sh b/scripts/check-all-by-signal.sh deleted file mode 100644 index 21454ae9b2..0000000000 --- a/scripts/check-all-by-signal.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env bash -# Copyright © 2023 OpenIM. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This script is check openim service is running normally -# -# Usage: `scripts/check-all.sh`. -# Encapsulated as: `make check`. -# READ: https://github.com/openimsdk/open-im-server/tree/main/scripts/install/environment.sh - -set -o errexit -set -o nounset -set -o pipefail - -OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. -source "${OPENIM_ROOT}/scripts/install/common.sh" - -OPENIM_VERBOSE=4 - -openim::log::info "# Begin to check all openim service" -. $(dirname ${BASH_SOURCE})/install/openim-msgtransfer.sh openim::msgtransfer::check_by_signal - - -echo "Check ports:" -openim::util::check_ports_by_signal ${OPENIM_SERVER_PORT_LISTARIES[@]} - - -set -e - -trap - ERR \ No newline at end of file diff --git a/scripts/stop-all.sh b/scripts/stop-all.sh index 58bf39b1ad..f1fab3c176 100755 --- a/scripts/stop-all.sh +++ b/scripts/stop-all.sh @@ -36,6 +36,12 @@ openim::util::stop_services_by_name_signal "${OPENIM_OUTPUT_HOSTBIN}" sleep 1 -source "${OPENIM_ROOT}/scripts/check-all-by-signal.sh" +openim::log::info "# Begin to check all openim service" +. $(dirname ${BASH_SOURCE})/install/openim-msgtransfer.sh openim::msgtransfer::check_by_signal + + +echo "Check ports:" +openim::util::check_ports_by_signal ${OPENIM_SERVER_PORT_LISTARIES[@]} + openim::log::success "✨ All processes to be killed" \ No newline at end of file