|
|
@ -33,15 +33,15 @@ openim::log::info "\n# Begin to check all openim service"
|
|
|
|
# OpenIM status
|
|
|
|
# OpenIM status
|
|
|
|
# Elegant printing function
|
|
|
|
# Elegant printing function
|
|
|
|
print_services_and_ports() {
|
|
|
|
print_services_and_ports() {
|
|
|
|
local -n service_names=$1
|
|
|
|
service_names=("$1[@]")
|
|
|
|
local -n service_ports=$2
|
|
|
|
service_ports=("$2[@]")
|
|
|
|
|
|
|
|
|
|
|
|
echo "+-------------------------+----------+"
|
|
|
|
echo "+-------------------------+----------+"
|
|
|
|
echo "| Service Name | Port |"
|
|
|
|
echo "| Service Name | Port |"
|
|
|
|
echo "+-------------------------+----------+"
|
|
|
|
echo "+-------------------------+----------+"
|
|
|
|
|
|
|
|
|
|
|
|
for index in "${!service_names[@]}"; do
|
|
|
|
for index in "${!service_names}"; do
|
|
|
|
printf "| %-23s | %-8s |\n" "${service_names[$index]}" "${service_ports[$index]}"
|
|
|
|
printf "| %-23s | %-8s |\n" "${!service_names[$index]}" "${!service_ports[$index]}"
|
|
|
|
done
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
echo "+-------------------------+----------+"
|
|
|
|
echo "+-------------------------+----------+"
|
|
|
|