From d8af52305e1ba2d23ede740783721f8ef83d3f1f Mon Sep 17 00:00:00 2001 From: RealStickman Date: Sun, 11 Sep 2022 14:08:46 +0200 Subject: [PATCH] Unattended Upgrades config --- .../29.unattended-upgrades/default.en.md | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 pages/02.linux/29.unattended-upgrades/default.en.md diff --git a/pages/02.linux/29.unattended-upgrades/default.en.md b/pages/02.linux/29.unattended-upgrades/default.en.md new file mode 100644 index 0000000..5713bf0 --- /dev/null +++ b/pages/02.linux/29.unattended-upgrades/default.en.md @@ -0,0 +1,44 @@ +--- +title: Unattended Upgrades +--- + +[toc] +## Installation +`# apt install unattended-upgrades` + +## Configuration +*NOTE: This configuration is tailored to my personal preferences. Feel free to do something else if you don't want what I'm doing* + +### Enable automatic reboots +If necessary, the server will automatically reboot. +An example would be kernel updates. + +Edit `/etc/apt/apt.conf.d/50unattended-upgrades` +``` +... +Unattended-Upgrade::Automatic-Reboot "true"; +... +``` + +### Repo update time +Create an override file for `apt-daily.timer` using this command +`$ sudo systemctl edit apt-daily.timer` + +Add these lines between the two comments +``` +[Timer] +OnCalendar=*-*-* 2:00 +RandomizedDelaySec=0 +``` + +### Host upgrade time +Create an override file for `apt-daily-upgrade.timer` using this command +`$ sudo systemctl edit apt-daily-upgrade.timer` + +Add these lines between the two comments +``` +[Timer] +OnCalendar=*-*-* 4:00 +RandomizedDelaySec=0 +``` +