From d43598710fe307f35ecb7737178e3eb0f9e1451f Mon Sep 17 00:00:00 2001 From: Tommy Date: Fri, 7 Jul 2023 02:41:36 -0700 Subject: [PATCH] Enable fstrim.timer --- GCP-Debian-11-Docker.sh | 3 +++ GCP-Debian-11.sh | 3 +++ Proxmox-8.sh | 3 +++ RHEL-Server-9.sh | 3 +++ Ubuntu-22.04-Desktop.sh | 3 +++ Ubuntu-22.04-Server.sh | 7 +++++-- 6 files changed, 20 insertions(+), 2 deletions(-) diff --git a/GCP-Debian-11-Docker.sh b/GCP-Debian-11-Docker.sh index 9a4f799..fc3e3ce 100644 --- a/GCP-Debian-11-Docker.sh +++ b/GCP-Debian-11-Docker.sh @@ -16,3 +16,6 @@ sudo apt update sudo apt -y --no-install-recommends install runsc sudo runsc install sudo systemctl restart docker + +# Enable fstrim.timer +sudo systemctl enable --now fstrim.timer \ No newline at end of file diff --git a/GCP-Debian-11.sh b/GCP-Debian-11.sh index 5e40084..158caaa 100644 --- a/GCP-Debian-11.sh +++ b/GCP-Debian-11.sh @@ -105,3 +105,6 @@ sudo mkdir -p /etc/systemd/system/NetworkManager.service.d sudo curl https://gitlab.com/divested/brace/-/raw/master/brace/usr/lib/systemd/system/NetworkManager.service.d/99-brace.conf -o /etc/systemd/system/NetworkManager.service.d/99-brace.conf echo "* hard core 0" | tee -a /etc/security/limits.conf + +# Enable fstrim.timer +sudo ystemctl enable --now fstrim.timer \ No newline at end of file diff --git a/Proxmox-8.sh b/Proxmox-8.sh index 667fbe1..b0085ac 100644 --- a/Proxmox-8.sh +++ b/Proxmox-8.sh @@ -66,3 +66,6 @@ systemctl enable --now fwupd-refresh.timer sed -Ezi.bak "s/(Ext.Msg.show\(\{\s+title: gettext\('No valid sub)/void\(\{ \/\/\1/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js systemctl restart pveproxy.service + +# Enable fstrim.timer +systemctl enable --now fstrim.timer \ No newline at end of file diff --git a/RHEL-Server-9.sh b/RHEL-Server-9.sh index 9a13072..d18e2ed 100644 --- a/RHEL-Server-9.sh +++ b/RHEL-Server-9.sh @@ -107,3 +107,6 @@ sudo firewall-cmd --reload sudo sed -i 's/apply_updates = no/apply_updates = yes\nreboot = when-needed/g' /etc/dnf/automatic.conf sudo systemctl enable --now dnf-automatic.timer + +# Enable fstrim.timer +sudo systemctl enable --now fstrim.timer \ No newline at end of file diff --git a/Ubuntu-22.04-Desktop.sh b/Ubuntu-22.04-Desktop.sh index 6900011..8148259 100644 --- a/Ubuntu-22.04-Desktop.sh +++ b/Ubuntu-22.04-Desktop.sh @@ -110,3 +110,6 @@ connection.stable-id=${CONNECTION}/${BOOT} EOF sudo systemctl restart NetworkManager + +# Enable fstrim.timer +sudo systemctl enable --now fstrim.timer \ No newline at end of file diff --git a/Ubuntu-22.04-Server.sh b/Ubuntu-22.04-Server.sh index ef3ef7c..477f2ba 100644 --- a/Ubuntu-22.04-Server.sh +++ b/Ubuntu-22.04-Server.sh @@ -46,5 +46,8 @@ sudo apt install fwupd mkdir -p /etc/systemd/system/fwupd-refresh.service.d echo '[Service] ExecStart=/usr/bin/fwupdmgr update' | tee /etc/systemd/system/fwupd-refresh.service.d/override.conf -systemctl daemon-reload -systemctl enable --now fwupd-refresh.timer +sudo systemctl daemon-reload +sudo systemctl enable --now fwupd-refresh.timer + +# Enable fstrim.timer +sudo systemctl enable --now fstrim.timer \ No newline at end of file