|
|
@ -1541,12 +1541,8 @@ openim::util::check_ports() {
|
|
|
|
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
|
|
|
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
|
|
|
if command -v ss > /dev/null 2>&1; then
|
|
|
|
if command -v ss > /dev/null 2>&1; then
|
|
|
|
info=$(ss -ltnp | grep ":$port" || true)
|
|
|
|
info=$(ss -ltnp | grep ":$port" || true)
|
|
|
|
openim::color::echo $COLOR_RED "!!!!!!!! port=$port"
|
|
|
|
|
|
|
|
openim::color::echo $COLOR_RED "!!!!!!!! info=$info"
|
|
|
|
|
|
|
|
else
|
|
|
|
else
|
|
|
|
info=$(netstat -ltnp | grep ":$port" || true)
|
|
|
|
info=$(netstat -ltnp | grep ":$port" || true)
|
|
|
|
openim::color::echo $COLOR_RED "!!!!!!!! port=$port"
|
|
|
|
|
|
|
|
openim::color::echo $COLOR_RED "!!!!!!!! info=$info"
|
|
|
|
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
|
|
|
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
|
|
|
# For macOS, use lsof
|
|
|
|
# For macOS, use lsof
|
|
|
|