mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-05 03:52:15 +08:00
fix: fix the port script
This commit is contained in:
parent
d02dc7c5d8
commit
ee30529e88
@ -30,8 +30,6 @@ OPENIM_VERBOSE=4
|
|||||||
|
|
||||||
openim::log::info "\n# Begin to check all openim service"
|
openim::log::info "\n# Begin to check all openim service"
|
||||||
|
|
||||||
openim::log::status "Check all dependent service ports"
|
|
||||||
|
|
||||||
handle_error() {
|
handle_error() {
|
||||||
echo "An error occurred. Printing ${STDERR_LOG_FILE} contents:"
|
echo "An error occurred. Printing ${STDERR_LOG_FILE} contents:"
|
||||||
cat "${STDERR_LOG_FILE}"
|
cat "${STDERR_LOG_FILE}"
|
||||||
@ -40,17 +38,15 @@ handle_error() {
|
|||||||
|
|
||||||
trap handle_error ERR
|
trap handle_error ERR
|
||||||
|
|
||||||
openim::log::info "\n## Check OpenIM service name"
|
|
||||||
. $(dirname ${BASH_SOURCE})/install/openim-msgtransfer.sh openim::msgtransfer::check_by_signal
|
. $(dirname ${BASH_SOURCE})/install/openim-msgtransfer.sh openim::msgtransfer::check_by_signal
|
||||||
|
|
||||||
openim::log::info "\n## Check all OpenIM service ports"
|
# Assuming openim::util::check_ports_by_signal function sets a proper exit status
|
||||||
echo "+++ The port being checked: ${OPENIM_SERVER_PORT_LISTARIES[@]}"
|
# based on whether services are running or not.
|
||||||
openim::util::check_ports_by_signal ${OPENIM_SERVER_PORT_LISTARIES[@]}
|
if openim::util::check_ports_by_signal ${OPENIM_SERVER_PORT_LISTARIES[@]}; then
|
||||||
if [[ $? -eq 0 ]]; then
|
echo "++++ All openim service ports stop successfully !"
|
||||||
|
else
|
||||||
echo "+++ cat openim log file >>> ${LOG_FILE}"
|
echo "+++ cat openim log file >>> ${LOG_FILE}"
|
||||||
openim::log::error_exit "The service does not stop properly, there are still processes running, please check!"
|
openim::log::error_exit "The service does not stop properly, there are still processes running, please check!"
|
||||||
else
|
|
||||||
echo "++++ All openim service ports stop successfully !"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user