mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-11-05 11:52:10 +08:00
Optimizing scripts
This commit is contained in:
parent
3b412a5708
commit
2e7adecff3
@ -2865,8 +2865,12 @@ function openim::util::find_process_ports() {
|
|||||||
done < <(lsof -nP -iTCP -iUDP | grep LISTEN | grep "$(pgrep -f "$process_path")" | awk '{print $9, $8}')
|
done < <(lsof -nP -iTCP -iUDP | grep LISTEN | grep "$(pgrep -f "$process_path")" | awk '{print $9, $8}')
|
||||||
|
|
||||||
protocol_ports=${protocol_ports%, }
|
protocol_ports=${protocol_ports%, }
|
||||||
echo "Process $process_path is listening on protocol & port: $protocol_ports "
|
|
||||||
|
|
||||||
|
if [[ -z "$protocol_ports" ]]; then
|
||||||
|
echo "Process $process_path is not listening on any ports"
|
||||||
|
else
|
||||||
|
echo "Process $process_path is listening on protocol & port: $protocol_ports"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user