mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-11-05 11:52:10 +08:00
Optimizing scripts
This commit is contained in:
parent
4d53925a50
commit
df32828712
@ -101,7 +101,6 @@ for item in "${OPENIM_ALL_SERVICE_LIBRARIES_NO_TRANSFER[@]}"; do
|
|||||||
openim::log::colorless "$item"
|
openim::log::colorless "$item"
|
||||||
done
|
done
|
||||||
|
|
||||||
openim::log::status "List the ports listened to by the OpenIM service:"
|
|
||||||
|
|
||||||
result=$(openim::util::check_process_names ${OPENIM_ALL_SERVICE_LIBRARIES_NO_TRANSFER[@]})
|
result=$(openim::util::check_process_names ${OPENIM_ALL_SERVICE_LIBRARIES_NO_TRANSFER[@]})
|
||||||
if [[ $? -ne 0 ]]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
@ -110,6 +109,7 @@ if [[ $? -ne 0 ]]; then
|
|||||||
echo "$result"
|
echo "$result"
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
|
openim::log::status "List the ports listened to by the OpenIM service:"
|
||||||
openim::util::find_ports_for_all_services ${OPENIM_ALL_SERVICE_LIBRARIES_NO_TRANSFER[@]}
|
openim::util::find_ports_for_all_services ${OPENIM_ALL_SERVICE_LIBRARIES_NO_TRANSFER[@]}
|
||||||
openim::util::find_ports_for_all_services ${OPENIM_MSGTRANSFER_BINARY[@]}
|
openim::util::find_ports_for_all_services ${OPENIM_MSGTRANSFER_BINARY[@]}
|
||||||
openim::log::success "All OpenIM services are running normally! "
|
openim::log::success "All OpenIM services are running normally! "
|
||||||
|
|||||||
@ -603,6 +603,7 @@ openim::util::stop_services_with_name() {
|
|||||||
# Iterate over each given service name.
|
# Iterate over each given service name.
|
||||||
for server_name in "$@"; do
|
for server_name in "$@"; do
|
||||||
# Use the `pgrep` command to find process IDs related to the given service name.
|
# Use the `pgrep` command to find process IDs related to the given service name.
|
||||||
|
echo "Stopping services with names: $server_name"
|
||||||
local pids=$(pgrep -f "$server_name")
|
local pids=$(pgrep -f "$server_name")
|
||||||
|
|
||||||
# If no process was found with the name, add it to the not_stopped list
|
# If no process was found with the name, add it to the not_stopped list
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user