apt install unattended-upgrades apt-listchanges
/var/log/dpkg.log
/var/log/unattended-upgrades/
apt-listchanges
:/etc/apt/listchanges.conf
: contient la configuration dont l'adresse email vers laquelle envoyé le rapport. adminsys@<domaine-sinp>
. Ce script ne semble pas utiliser le fichier /etc/aliases
./etc/apt/apt.conf.d/20listchanges
: déclenche automatiquement le script lors des mises à jour. vi /etc/apt/apt.conf.d/20auto-upgrades
// Enable the update/upgrade script (0=disable) APT::Periodic::Enable "1"; // Do "apt-get update" automatically every n-days (0=disable) APT::Periodic::Update-Package-Lists "1"; // Do "apt-get upgrade --download-only" every n-days (0=disable) APT::Periodic::Download-Upgradeable-Packages "7"; // Run the "unattended-upgrade" security upgrade script every n-days (0=disabled) // Requires the package "unattended-upgrades" and will write a log in /var/log/unattended-upgrades APT::Periodic::Unattended-Upgrade "1"; // Do "apt-get autoclean" every n-days (0=disable) APT::Periodic::AutocleanInterval "7"; // - Send report mail to root // 0: no report (or null string) // 1: progress report (actually any string) // 2: + command outputs (remove -qq, remove 2>/dev/null, add -d) // 3: + trace on APT::Periodic::Verbose "1"; // sleep for a random interval of time (default 30min) APT::Periodic::RandomSleep "1800";
vi /etc/apt/apt.conf.d/50unattended-upgrades
# Paquets mis à jour Unattended-Upgrade::Origins-Pattern { "origin=Debian,codename=${distro_codename}-updates"; "origin=Debian,codename=${distro_codename},label=Debian"; "origin=Debian,codename=${distro_codename},label=Debian-Security"; "origin=Debian,codename=${distro_codename}-security,label=Debian-Security"; }; # Ne pas mettre à jour les paquets : Grub Unattended-Upgrade::Package-Blacklist { "grub*"; }; # Envoyer les emails à l'admin système en indiquant son email (ce script ne semble pas utiliser le fichier /etc/aliases) Unattended-Upgrade::Mail "adminsys@<sinp-domaine>"; # Interdire le reboot auto Unattended-Upgrade::Automatic-Reboot "false"; # Ne pas prendre en charge la gestion de l'énergie Unattended-Upgrade::OnlyOnACPower "false";
unattended-upgrades --dry-run --debug
cat /var/log/unattended-upgrades/unattended-upgrades.log | more