|
|
@ -415,11 +415,12 @@ openim::util::check_process_names() {
|
|
|
|
for pid in "${pids[@]}"; do
|
|
|
|
for pid in "${pids[@]}"; do
|
|
|
|
local command=$(ps -p $pid -o cmd=)
|
|
|
|
local command=$(ps -p $pid -o cmd=)
|
|
|
|
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 any newline characters
|
|
|
|
|
|
|
|
|
|
|
|
# Insert a space at the desired position in the port string
|
|
|
|
# Add space within port numbers, assuming you need to format them
|
|
|
|
if [[ ! -z $port && $port != "N/A" ]]; then
|
|
|
|
if [[ ! -z $port && $port != "N/A" ]]; then
|
|
|
|
port="${port:0:4} ${port:4}" # Add a space after the fourth character
|
|
|
|
# Example formatting: assuming ports are returned as a single long string and you want to separate every 4 characters with a space
|
|
|
|
|
|
|
|
port=$(echo "$port" | sed 's/.\{4\}/& /g')
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if [[ -z $port ]]; then
|
|
|
|
if [[ -z $port ]]; then
|
|
|
@ -433,6 +434,7 @@ openim::util::check_process_names() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Print information
|
|
|
|
# Print information
|
|
|
|
if [[ ${#not_started[@]} -ne 0 ]]; then
|
|
|
|
if [[ ${#not_started[@]} -ne 0 ]]; then
|
|
|
|
echo "Not started processes:"
|
|
|
|
echo "Not started processes:"
|
|
|
|