Optimizing scripts

This commit is contained in:
skiffer-git 2024-03-21 18:47:29 +08:00
parent 036e00eff0
commit 753ba6f08f

View File

@ -605,6 +605,7 @@ openim::util::stop_services_with_name() {
# Use the `pgrep` command to find process IDs related to the given service name.
echo "Stopping services with name: $server_name"
local pids=$(pgrep -f "$server_name")
echo "Stopping services with name: $server_name "$pids
# If no process was found with the name, add it to the not_stopped list
if [[ -z $pids ]]; then