diff options
Diffstat (limited to 'bin/ncp/SYSTEM/unattended-upgrades.sh')
-rw-r--r-- | bin/ncp/SYSTEM/unattended-upgrades.sh | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/bin/ncp/SYSTEM/unattended-upgrades.sh b/bin/ncp/SYSTEM/unattended-upgrades.sh index 7f7405e0..0310d740 100644 --- a/bin/ncp/SYSTEM/unattended-upgrades.sh +++ b/bin/ncp/SYSTEM/unattended-upgrades.sh @@ -21,12 +21,7 @@ configure() [[ $ACTIVE == "yes" ]] && local AUTOUPGRADE=1 || local AUTOUPGRADE=0 [[ $AUTOREBOOT == "yes" ]] && local AUTOREBOOT=true || local AUTOREBOOT=false - # Raspbian case - grep -q Raspbian /etc/issue && { - - # It seems like the label Raspbian-Security does not work for Raspbian - # See https://www.raspberrypi.org/forums/viewtopic.php?t=82863&p=585739 - cat > /etc/apt/apt.conf.d/20ncp-upgrades <<EOF + cat > /etc/apt/apt.conf.d/20ncp-upgrades <<EOF APT::Periodic::Update-Package-Lists "1"; APT::Periodic::Unattended-Upgrade "$AUTOUPGRADE"; APT::Periodic::MaxAge "14"; @@ -34,7 +29,9 @@ APT::Periodic::AutocleanInterval "7"; Unattended-Upgrade::Automatic-Reboot "$AUTOREBOOT"; Unattended-Upgrade::Automatic-Reboot-Time "04:00"; Unattended-Upgrade::Origins-Pattern { -o=Raspbian,n=stretch,l=Raspbian; +o=Debian,n=stretch; +o=deb.sury.org,n=stretch; +o="Raspberry Pi Foundation",n=stretch; } Dpkg::Options { "--force-confdef"; @@ -42,24 +39,6 @@ Dpkg::Options { }; EOF - # Armbian case # TODO security only? - } || { - cat > /etc/apt/apt.conf.d/20ncp-upgrades <<EOF -APT::Periodic::Update-Package-Lists "1"; -APT::Periodic::Unattended-Upgrade "$AUTOUPGRADE"; -APT::Periodic::MaxAge "14"; -APT::Periodic::AutocleanInterval "7"; -Unattended-Upgrade::Automatic-Reboot "$AUTOREBOOT"; -Unattended-Upgrade::Automatic-Reboot-Time "04:00"; -Unattended-Upgrade::Origins-Pattern { -o=Debian,n=stretch,l=Debian; -} -Dpkg::Options { - "--force-confdef"; - "--force-confold"; -}; -EOF - } echo "Unattended upgrades active: $ACTIVE (autoreboot $AUTOREBOOT)" } |