unattended-upgradessudo apt install unattended-upgrades
sudo systemctl status unattended-upgrades
sudo nano /etc/apt/apt.conf.d/50unattended-upgrades
Unattended-Upgrade::Package-BlacklistEksempel: Pakkene
mariadbognginxblir ikke automatisk oppdatert
Unattended-Upgrade::Package-Blacklist {
mariadb
nginx
}
// Automatically reboot *WITHOUT CONFIRMATION* if
// the file /var/run/reboot-required is found after the upgrade
//Unattended-Upgrade::Automatic-Reboot "false";
Unattended-Upgrade::Automatic-Reboot "true";
// Automatically reboot even if there are users currently logged in
// when Unattended-Upgrade::Automatic-Reboot is set to true
//Unattended-Upgrade::Automatic-Reboot-WithUsers "true";
// If automatic reboot is enabled and needed, reboot at the specific
// time instead of immediately
// Default: "now"
//Unattended-Upgrade::Automatic-Reboot-Time "02:00";
sudo nano /etc/apt/apt.conf.d/20auto-upgrades
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";
Begge linjene skal ha verdi 1 for å være aktive.
Hentet herfra:
https://linuxopsys.com/topics/ubuntu-automatic-updates
Last modified: Fri Jul 14 08:29:00 2023