fix: scripts fix

Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
This commit is contained in:
Xinwei Xiong(cubxxw-openim)
2023-09-01 11:24:37 +08:00
parent 17bc9596da
commit 9c4517ac05
7 changed files with 26 additions and 10 deletions
+6 -1
View File
@@ -281,7 +281,12 @@ openim::util::check_ports() {
local fd=$(echo $details | awk '{print $3}')
# Get the start time of the process using the PID
local start_time=$(ps -p $pid -o lstart=)
if [[ -z $pid ]]; then
local start_time="N/A"
else
# Get the start time of the process using the PID
local start_time=$(ps -p $pid -o lstart=)
fi
started+=("Port $port - Command: $command, PID: $pid, FD: $fd, Started: $start_time")
fi