Skip to content

Instantly share code, notes, and snippets.

@pvillega
Forked from anatolebeuzon/20auto-upgrades
Last active June 13, 2022 12:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pvillega/bbbb7f240f161f8bcc7b9998e23163c5 to your computer and use it in GitHub Desktop.
Save pvillega/bbbb7f240f161f8bcc7b9998e23163c5 to your computer and use it in GitHub Desktop.
Unattended-upgrades config for Raspberry Pi running Raspbian - /etc/apt/apt.conf.d
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::AutocleanInterval "3";
APT::Periodic::Verbose "1";
APT::Periodic::Unattended-Upgrade "1";
// The Raspberry Pi Foundation doesn't use separate a separate security upgrades channel.
// To make sure your RPi has the latest security fixes, you have to install all updates.
Unattended-Upgrade::Mail "username";
Unattended-Upgrade::Origins-Pattern {
"origin=Raspbian,codename=${distro_codename},label=Raspbian";
"origin=Raspberry Pi Foundation,codename=${distro_codename},label=Raspberry Pi Foundation";
};
// Automatically reboot *WITHOUT CONFIRMATION* if
// the file /var/run/reboot-required is found after the upgrade
Unattended-Upgrade::Automatic-Reboot "true";
// If automatic reboot is enabled and needed, reboot at the specific
// time instead of immediately
// Default: "now"
Unattended-Upgrade::Automatic-Reboot-Time "03:00";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment