diff options
author | nachoparker <nacho@ownyourbits.com> | 2017-07-27 11:27:56 +0300 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2017-08-11 00:17:56 +0300 |
commit | 8127734d92012135c5dfd4dab4e3a61ea9c2093c (patch) | |
tree | 208e84296622400d524ca0d1a12e1f1b924f04cc | |
parent | 00a483af0888fa8d7aef38a2293e340c471a6c83 (diff) |
fix unattended-upgradesv0.17.12
-rw-r--r-- | etc/nextcloudpi-config.d/unattended-upgrades.sh | 7 | ||||
-rwxr-xr-x | update.sh | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/etc/nextcloudpi-config.d/unattended-upgrades.sh b/etc/nextcloudpi-config.d/unattended-upgrades.sh index c7e3da21..93b33df4 100644 --- a/etc/nextcloudpi-config.d/unattended-upgrades.sh +++ b/etc/nextcloudpi-config.d/unattended-upgrades.sh @@ -28,6 +28,9 @@ configure() { [[ $ACTIVE_ == "yes" ]] && local AUTOUPGRADE=1 || local AUTOUPGRADE=0 [[ $AUTOREBOOT_ == "yes" ]] && local AUTOREBOOT=true || local AUTOREBOOT=false + + # 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/20nextcloudpi-upgrades <<EOF APT::Periodic::Update-Package-Lists "1"; APT::Periodic::Unattended-Upgrade "$AUTOUPGRADE"; @@ -35,6 +38,10 @@ 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=Raspbian,n=jessie,l=Raspbian; +o=Raspbian,n=stretch,l=Raspbian; +} EOF echo "Unattended upgrades active: $ACTIVE_ (autoreboot $AUTOREBOOT_)" } @@ -50,6 +50,10 @@ cp -r ncp-web /var/www/ chown www-data:www-data /var/www/ncp-web chmod 770 /var/www/ncp-web +# force-fix unattended-upgrades for old image users +cd /usr/local/etc/nextcloudpi-config.d/ +activate_script unattended-upgrades.sh + # License # # This script is free software; you can redistribute it and/or modify it |