User Tools

Site Tools


general:linux:debian_unattended_upgrades

Verify that “mail root” works

Install packages

aptitude install unattended-upgrades apt-listchanges needrestart
dpkg-reconfigure -plow unattended-upgrades
dpkg-reconfigure -plow apt-listchanges
[apt]
frontend=pager
email_address=root
confirm=0
save_seen=/var/lib/apt/listchanges.db
which=news

Edit /etc/apt/apt.conf.d/50unattended-upgrades make sure to uncomment: Unattended-Upgrade::Mail “root”;

Configure needrestart to restart services automatically

--- /etc/needrestart/needrestart.conf~  2015-05-27 21:25:50.000000000 +0200
+++ /etc/needrestart/needrestart.conf   2015-12-04 16:19:00.429894968 +0100
@@ -25,7 +25,7 @@
 #$nrconf{hook_d} = '/etc/needrestart/hook.d';
 
 # Restart services (l)ist only, (i)nteractive or (a)utomatically.
-#$nrconf{restart} = 'i';
+$nrconf{restart} = 'a';
 
 # Use prefered UI package.
 #$nrconf{ui} = 'NeedRestart::UI::stdio';
general/linux/debian_unattended_upgrades.txt · Last modified: 2020/11/17 22:50 by