Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/nextcloudpi-config.d/unattended-upgrades.sh7
-rwxr-xr-xupdate.sh4
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_)"
}
diff --git a/update.sh b/update.sh
index df5cdb38..a77b3838 100755
--- a/update.sh
+++ b/update.sh
@@ -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