mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-10 06:51:04 +01:00
reduced stati when service is seen as active
This commit is contained in:
parent
25bd058fca
commit
58c99fef6e
@ -20,7 +20,7 @@ def check_service_active(service_name):
|
|||||||
"""Check if a service is active or activating."""
|
"""Check if a service is active or activating."""
|
||||||
result = subprocess.run(['systemctl', 'is-active', service_name], stdout=subprocess.PIPE)
|
result = subprocess.run(['systemctl', 'is-active', service_name], stdout=subprocess.PIPE)
|
||||||
service_status = result.stdout.decode('utf-8').strip()
|
service_status = result.stdout.decode('utf-8').strip()
|
||||||
return service_status in ['active', 'activating', 'deactivating', 'reloading']
|
return service_status in ['active', 'activating']
|
||||||
|
|
||||||
def freeze(services_to_wait_for, ignored_services):
|
def freeze(services_to_wait_for, ignored_services):
|
||||||
# Filter services that exist and are not in the ignored list
|
# Filter services that exist and are not in the ignored list
|
||||||
|
Loading…
Reference in New Issue
Block a user