fix: fix the error

pull/1933/head
luhaoling 2 years ago
parent 9318322fa5
commit 93f2034572

@ -47,12 +47,14 @@ function openim::api::start() {
openim::log::info "Starting ${SERVER_NAME} ..."
readonly OPENIM_API_SERVER_LIBRARIES="${OPENIM_OUTPUT_HOSTBIN}/${SERVER_NAME}"
openim::util::stop_services_with_name ${OPENIM_API_SERVER_LIBRARIES}
printf "+------------------------+--------------+\n"
printf "| Service Name | Port |\n"
printf "+------------------------+--------------+\n"
readonly OPENIM_API_SERVER_LIBRARIES="${OPENIM_OUTPUT_HOSTBIN}/${SERVER_NAME}"
openim::util::stop_services_with_name ${OPENIM_API_SERVER_LIBRARIES}
local length=${#OPENIM_API_SERVICE_LISTARIES[@]}
for ((i=0; i<length; i++)); do

@ -684,9 +684,9 @@ openim::util::stop_services_with_name() {
all_pids_empty=true
for server_name in "$@"; do
pids=$(pgrep -f "$server_name")
server_pids=$(pgrep -f "$server_name")
if [[ ! -z $pids ]]; then
if [[ ! -z $server_pids ]]; then
all_pids_empty=false
break # If at least one process corresponding to server_name is found, jump out of the for loop.
fi

Loading…
Cancel
Save