Optimizing scripts

pull/2100/head
skiffer-git 2 years ago
parent 4d53925a50
commit df32828712

@ -101,7 +101,6 @@ for item in "${OPENIM_ALL_SERVICE_LIBRARIES_NO_TRANSFER[@]}"; do
openim::log::colorless "$item"
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[@]})
if [[ $? -ne 0 ]]; then
@ -110,6 +109,7 @@ if [[ $? -ne 0 ]]; then
echo "$result"
exit 1
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_MSGTRANSFER_BINARY[@]}
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.
for server_name in "$@"; do
# 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")
# If no process was found with the name, add it to the not_stopped list

Loading…
Cancel
Save