Merge pull request #12846 from petiepooo/fix/check-srvc-status

check status before stopping service
This commit is contained in:
Mike Reeves
2024-04-25 15:10:42 -04:00
committed by GitHub

View File

@@ -1584,7 +1584,9 @@ reinstall_init() {
# Kill any salt processes (safely) # Kill any salt processes (safely)
for service in "${salt_services[@]}"; do for service in "${salt_services[@]}"; do
# Stop the service in the background so we can exit after a certain amount of time # Stop the service in the background so we can exit after a certain amount of time
systemctl stop "$service" & if check_service_status "$service"; then
systemctl stop "$service" &
fi
local pid=$! local pid=$!
local count=0 local count=0