Disable automatic systemd dependencies

This commit is contained in:
Fabian 2024-11-04 00:34:59 +01:00
parent 2669a7a185
commit 30ac033863

11
main.py
View File

@ -101,11 +101,12 @@ def write_service_units(args, yaml_dict):
unit_file = IniFile()
unit_file["Unit"] = {}
unit_file["Unit"]["Description"] = f"{service_name.capitalize()} container"
if "depends_on" in service:
enforce_list("depends_on", service)
for dependency in service["depends_on"]:
unit_file["Unit"].setdefault("Requires", []).append(f"{dependency}.service")
unit_file["Unit"].setdefault("After", []).append(f"{dependency}.service")
# currently decreases reliability instead of increasing it
# if "depends_on" in service:
# enforce_list("depends_on", service)
# for dependency in service["depends_on"]:
# unit_file["Unit"].setdefault("Requires", []).append(f"{dependency}.service")
# unit_file["Unit"].setdefault("After", []).append(f"{dependency}.service")
unit_file["Container"] = {}
if "container_name" in service: