From a9eee1e0799a11e4cbe4178fbea4f040960e2ba3 Mon Sep 17 00:00:00 2001 From: seppdroid Date: Mon, 26 May 2025 13:35:00 +0000 Subject: [PATCH] Add ubnt-autopatch-set.md --- ubnt-autopatch-set.md | 49 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 ubnt-autopatch-set.md diff --git a/ubnt-autopatch-set.md b/ubnt-autopatch-set.md new file mode 100644 index 0000000..2044e98 --- /dev/null +++ b/ubnt-autopatch-set.md @@ -0,0 +1,49 @@ +sudo apt update +sudo apt install unattended-upgrades + +sudo dpkg-reconfigure --priority=low unattended-upgrades + +Edit the configuration file: + +sudo nano /etc/apt/apt.conf.d/50unattended-upgrades + +Uncomment or add (remove // from) the appropriate lines, like: + +"${distro_id}:${distro_codename}-security"; +"${distro_id}:${distro_codename}-updates"; + +Optional but recommended: + + Enable automatic reboot after updates: + +Unattended-Upgrade::Automatic-Reboot "true"; + +Set reboot time (optional): + +Unattended-Upgrade::Automatic-Reboot-Time "02:00"; + +Edit the periodic config file: + +sudo nano /etc/apt/apt.conf.d/20auto-upgrades + +Add or verify these lines: + +APT::Periodic::Update-Package-Lists "1"; +APT::Periodic::Download-Upgradeable-Packages "1"; +APT::Periodic::AutocleanInterval "7"; +APT::Periodic::Unattended-Upgrade "1"; + +Explanation: + + "1" means daily. + + AutocleanInterval removes old package files weekly. + + +You can monitor updates with: + +cat /var/log/unattended-upgrades/unattended-upgrades.log + +Or errors: + +cat /var/log/unattended-upgrades/unattended-upgrades.log \ No newline at end of file