Development
This commit is contained in:
parent
d77344ead0
commit
23a947a6b8
1 changed files with 14 additions and 0 deletions
|
|
@ -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=).")
|
||||
|
||||
|
||||
# ===================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue