User Tools

Site Tools


linux:unattended-updates

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux:unattended-updates [2018/07/23 17:45] Wulf Rajeklinux:unattended-updates [2023/06/05 14:05] (current) – [Initial installation and configuration] Wulf Rajek
Line 13: Line 13:
 #uncomment the desired origin. For only security updates, comment out everything else #uncomment the desired origin. For only security updates, comment out everything else
 Unattended-Upgrade::Origins-Pattern { Unattended-Upgrade::Origins-Pattern {
-      "o=Debian,n=stretch"; +      "o=Debian,n=bullseye"; 
-      "o=Debian,n=stretch-updates"; +      "o=Debian,n=bullseye-updates"; 
-      "o=Debian,n=stretch-proposed-updates"; +      "o=Debian,n=bullseye-proposed-updates"; 
-      "o=Debian,n=stretch,l=Debian-Security";+      "o=Debian,n=bullseye-security"; 
 +      "o=Debian,n=bullseye,l=Debian-Security";
  
 //To enable ALL updates, use this:       //To enable ALL updates, use this:      
Line 57: Line 58:
 <code> <code>
 vi /etc/cron.d/unattended-upgrade  vi /etc/cron.d/unattended-upgrade 
-*/4 * * * root sleep $(( 1$(date +\%N) \% 14400 ));PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin unattended-upgrade+*/4 * * * root sleep $(( 1$(date +\%N) \% 14400 ));PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin unattended-upgrade
 </code> </code>
  
Line 92: Line 93:
 </code> </code>
  
 +
 +
 +===== Notify required reboot on login =====
 +<code>
 +vi /root/.profile
 +</code>
 +add after the .bashrc call, but before the mesg line:
 +<code>
 +[ -f /var/run/reboot-required ] && echo -e "\n*** System restart required ***\n"
 +</code>
 +
 +===== Running on battery =====
 +
 +For unattended-upgrades to skip upgrades when the system is running on battery, the following package needs to be installed:
 +<code>
 +apt-get install powermgmt-base
 +</code>
  
linux/unattended-updates.1532364350.txt.gz · Last modified: (external edit)