feat: Add memory retention policies for apt and systemd-journal

This commit is contained in:
deytenit committed 2026-09-27 21:41:02 +03:00
1 parent 48840c3022
commit 0748ab43a0
2 files changed
+40

No files matched your search

+10
View File
@@ -10,6 +10,16 @@ apt-get install -y --no-install-recommends \
parted fdisk pciutils usbutils smartmontools tmux vim less tree bash-completion \
git python3 python3-minimal sudo rsyslog cron qemu-guest-agent
# Prevent apt from retaining downloaded archives on disk
echo 'APT::Keep-Downloaded-Packages "0";' > /etc/apt/apt.conf.d/99-apex
# Limit systemd journal disk usage
mkdir -p /etc/systemd/journald.conf.d
cat << 'EOF_JOURNAL' > /etc/systemd/journald.conf.d/99-apex.conf
[Journal]
SystemMaxUse=200M
EOF_JOURNAL
echo "=== [2/6] Configuring Sudo & Passwordless Escalation ==="
cat << 'EOF_SUDO' > /etc/sudoers.d/99-apex
%sudo ALL=(ALL:ALL) NOPASSWD: ALL