User Tools

Site Tools


os:debian:unattendedupgrades

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
os:debian:unattendedupgrades [2026/03/18 07:51] warnaudos:debian:unattendedupgrades [2026/06/07 11:13] (current) – [7. Minimal checklist] warnaud
Line 223: Line 223:
  
  
 +===== 8. auto-reboot =====
 +In this example, timer for upgrade is at 2:00 AM then reboot if needed is at 4:00AM
 +<code bash>
 +sudo apt install update-notifier-common -y
 +sudo vim /etc/apt/apt.conf.d/51unattended-upgrades-local</code>
 +add:
 +<code perl>
 +Unattended-Upgrade::Automatic-Reboot "true";
 +Unattended-Upgrade::Automatic-Reboot-Time "04:00";
 +# to avoid reboot while people logged in:
 +#Unattended-Upgrade::Automatic-Reboot-WithUsers "false";</code>
  
 +<code bash>
 +sudo systemctl enable --now unattended-upgrades</code>
 +Set time for upgrades ( before?):
 +<code bash>
 +sudo systemctl edit apt-daily-upgrade.timer</code>
 +<code perl>
 +### Editing /etc/systemd/system/apt-daily-upgrade.timer.d/override.conf
 +### Anything between here and the comment below will become the contents of the drop-in file
  
 +[Timer] 
 +OnCalendar= 
 +OnCalendar=*-*-* 02:00:00 
 +RandomizedDelaySec=0 
 +Persistent=true 
 +</code> 
 +Relaunch/check: 
 +<code bash> sudo systemctl restart apt-daily-upgrade.timer 
 +sudo systemctl status apt-daily-upgrade.timer</code>
  
  
os/debian/unattendedupgrades.1773816674.txt.gz · Last modified: by warnaud