mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Merge pull request #12846 from petiepooo/fix/check-srvc-status
check status before stopping service
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user