Skip to content

Commit

Permalink
Update check-all.sh (#1591)
Browse files Browse the repository at this point in the history
  • Loading branch information
cubxxw committed Dec 25, 2023
1 parent 34ed032 commit f105280
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/check-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ openim::log::info "\n# Begin to check all openim service"
# OpenIM status
# Elegant printing function
print_services_and_ports() {
local -n service_names=$1
local -n service_ports=$2
service_names=("$1[@]")
service_ports=("$2[@]")

echo "+-------------------------+----------+"
echo "| Service Name | Port |"
echo "+-------------------------+----------+"

for index in "${!service_names[@]}"; do
printf "| %-23s | %-8s |\n" "${service_names[$index]}" "${service_ports[$index]}"
for index in "${!service_names}"; do
printf "| %-23s | %-8s |\n" "${!service_names[$index]}" "${!service_ports[$index]}"
done

echo "+-------------------------+----------+"
Expand Down

0 comments on commit f105280

Please sign in to comment.