Script Refactoring

pull/2148/head
skiffer-git 2 years ago
parent 96777bbf2f
commit 38c1fe40fe

@ -2476,7 +2476,7 @@ function openim::util::print_binary_ports() {
# Remove trailing spaces and duplicate ports if any # Remove trailing spaces and duplicate ports if any
ports=$(echo "$ports" | xargs | tr ' ' '\n' | uniq | tr '\n' ' ') ports=$(echo "$ports" | xargs | tr ' ' '\n' | uniq | tr '\n' ' ')
if [[ ! -n "$ports" ]]; then if [[ ${#ports} -eq 1 ]]; then
echo "$binary_path is not listening on any ports." ["$ports"] echo "$binary_path is not listening on any ports." ["$ports"]
else else
echo "$binary_path is listening on the following ports: $ports" ["$ports"] echo "$binary_path is listening on the following ports: $ports" ["$ports"]

Loading…
Cancel
Save