From 23a947a6b8d87423ad85c6de3996824cf07dc994 Mon Sep 17 00:00:00 2001 From: Matthew Grotke Date: Wed, 3 Jun 2026 01:09:12 -0400 Subject: [PATCH] Development --- routlin/install.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/routlin/install.py b/routlin/install.py index 105abb8..c9780cc 100644 --- a/routlin/install.py +++ b/routlin/install.py @@ -192,6 +192,7 @@ def install_core_packages(pm): if not missing: print(" All required packages are already installed.") + fix_freeradius_service_file() return print(" The following packages are not installed:") @@ -210,6 +211,19 @@ def install_core_packages(pm): die("Package installation failed. Install manually and retry.") print("\n Core packages installed.") + fix_freeradius_service_file() + + +def fix_freeradius_service_file(): + svc = Path("/lib/systemd/system/freeradius.service") + if not svc.exists(): + return + text = svc.read_text() + if "MemoryLimit=" not in text: + return + svc.write_text(text.replace("MemoryLimit=", "MemoryMax=")) + subprocess.run(["systemctl", "daemon-reload"], capture_output=True, text=True) + print(" Fixed deprecated MemoryLimit= in freeradius.service (replaced with MemoryMax=).") # ===================================================================