mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-11-05 21:02:11 +08:00
Optimizing scripts
This commit is contained in:
parent
753ba6f08f
commit
8c8a0232d9
@ -622,6 +622,10 @@ openim::util::stop_services_with_name() {
|
||||
|
||||
# If there's a Process ID, it means the service with the name is running.
|
||||
if [[ -n $pid ]]; then
|
||||
# Print the binary path for the PID
|
||||
binary_path=$(readlink -f /proc/$pid/exe)
|
||||
echo "PID $pid corresponds to binary path: $binary_path"
|
||||
|
||||
# Try to stop the service by killing its process.
|
||||
if kill -15 $pid 2>/dev/null; then
|
||||
stopped_this_time=true
|
||||
@ -629,6 +633,7 @@ openim::util::stop_services_with_name() {
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
if $stopped_this_time; then
|
||||
stopped+=("$server_name")
|
||||
else
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user