mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-03 02:42:19 +08:00
Optimize script logs
This commit is contained in:
parent
db0ae689ae
commit
071937de50
@ -417,11 +417,13 @@ for process_name in "$@"; do
|
|||||||
local start_time=$(ps -p $pid -o lstart=)
|
local start_time=$(ps -p $pid -o lstart=)
|
||||||
local port=$(get_port $pid | tr -d '\n') # Remove newline characters
|
local port=$(get_port $pid | tr -d '\n') # Remove newline characters
|
||||||
|
|
||||||
# Ensure port information is followed by a space for separation
|
# Insert a space at the desired position in the port string
|
||||||
|
if [[ ! -z $port && $port != "N/A" ]]; then
|
||||||
|
port="${port:0:4} ${port:4}" # Add a space after the fourth character
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -z $port ]]; then
|
if [[ -z $port ]]; then
|
||||||
port="N/A"
|
port="N/A"
|
||||||
else
|
|
||||||
port="$port " # Add a trailing space for separation
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
started+=("Process $process_name - Command: $command, PID: $pid, Port: $port, Start time: $start_time")
|
started+=("Process $process_name - Command: $command, PID: $pid, Port: $port, Start time: $start_time")
|
||||||
@ -430,6 +432,7 @@ for process_name in "$@"; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Print information
|
# Print information
|
||||||
if [[ ${#not_started[@]} -ne 0 ]]; then
|
if [[ ${#not_started[@]} -ne 0 ]]; then
|
||||||
echo "Not started processes:"
|
echo "Not started processes:"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user