From e5bf63b31f9f682d6a8efd846fa4232163072a97 Mon Sep 17 00:00:00 2001 From: MacRimi Date: Sun, 18 Oct 2026 14:02:33 +0200 Subject: [PATCH] Remove the current open-file limits on uninstall and align the Log2RAM check - Uninstalling removes DefaultLimitNOFILE=1048576 and ulimit -n 1048576 as well as the legacy 256000 lines - The customizable post-install runs the Log2RAM check every 10 minutes at low priority, as the automated one does --- scripts/post_install/customizable_post_install.sh | 3 ++- scripts/post_install/uninstall-tools.sh | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/post_install/customizable_post_install.sh b/scripts/post_install/customizable_post_install.sh index 39274146..81601230 100644 --- a/scripts/post_install/customizable_post_install.sh +++ b/scripts/post_install/customizable_post_install.sh @@ -3580,7 +3580,8 @@ EOF SHELL=/bin/bash PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin MAILTO="" -*/5 * * * * root /usr/local/bin/log2ram-check.sh >/dev/null 2>&1 +# nice/ionice keep the check off the priority queue for scheduled tasks. +3-59/10 * * * * root nice -n 19 ionice -c 3 /usr/local/bin/log2ram-check.sh >/dev/null 2>&1 EOF chmod 0644 /etc/cron.d/log2ram-auto-sync chown root:root /etc/cron.d/log2ram-auto-sync diff --git a/scripts/post_install/uninstall-tools.sh b/scripts/post_install/uninstall-tools.sh index 1724f849..91f90867 100644 --- a/scripts/post_install/uninstall-tools.sh +++ b/scripts/post_install/uninstall-tools.sh @@ -581,7 +581,7 @@ uninstall_system_limits() { # Remove systemd limits (restore defaults) for file in /etc/systemd/system.conf /etc/systemd/user.conf; do if [ -f "$file" ]; then - pmx_edit_file "$file" '/^DefaultLimitNOFILE=256000/d' + pmx_edit_file "$file" -e '/^DefaultLimitNOFILE=256000$/d' -e '/^DefaultLimitNOFILE=1048576$/d' fi done @@ -594,7 +594,7 @@ uninstall_system_limits() { # Remove ulimit from profile if [ -f /root/.profile ]; then - pmx_edit_file /root/.profile '/ulimit -n 256000/d' + pmx_edit_file /root/.profile -e '/^ulimit -n 256000$/d' -e '/^ulimit -n 1048576$/d' fi # Reload sysctl