Refactor systemctl services and categories due to alarm bugs

This commit restructures systemctl service definitions and category mappings.

Motivation: Alarm-related bugs revealed inconsistencies in service and role handling.

Preparation step: lays the groundwork for fixing the alarm issues by aligning categories, roles, and service templates.
This commit is contained in:
2025-08-18 13:35:43 +02:00
parent 29f50da226
commit 3a839cfe37
289 changed files with 975 additions and 948 deletions

View File

@@ -65,21 +65,13 @@ def wait_for_all_services_to_stop(filtered_services, max_attempts, attempt):
def get_max_attempts(timeout_sec):
return timeout_sec // BREAK_TIME_SECONDS
def append_suffix_to_services(services, suffix=".infinito"):
"""
Append a specified suffix to each service name in the list.
"""
return [service + suffix for service in services]
def main(services, ignored_services, timeout_sec):
"""
Main function to process the command-line arguments and perform actions.
"""
services_with_suffix = append_suffix_to_services(services)
ignored_services_with_suffix = append_suffix_to_services(ignored_services)
filtered_services = filter_services(services_with_suffix, ignored_services_with_suffix )
print(f"Services to handle: {services_with_suffix}")
print(f"Services to ignore: {ignored_services_with_suffix}")
filtered_services = filter_services(services, ignored_services )
print(f"Services to handle: {services}")
print(f"Services to ignore: {ignored_services}")
print(f"Services filtered: {filtered_services}")
print("Waiting for services to stop.")