Optimizing scripts

pull/2100/head
skiffer-git 2 years ago
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…
Cancel
Save