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:
authornachoparker <nacho@ownyourbits.com>2019-03-10 03:44:56 +0300
committernachoparker <nacho@ownyourbits.com>2019-03-11 08:39:01 +0300
commit0c95243d8f16364bb0a60760b9460bcf4ebd7aab (patch)
tree9cb37c6d18ccf2ba577db831e0f075dc82dba20b
parent6eecf132ff071ba11bdba300345a60b6221ff7b0 (diff)
unattended upgrades: update labelsv1.9.4
-rw-r--r--bin/ncp/SYSTEM/unattended-upgrades.sh29
-rw-r--r--changelog.md6
-rwxr-xr-xupdate.sh3
3 files changed, 11 insertions, 27 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)"
}
diff --git a/changelog.md b/changelog.md
index be47dea0..5e66757c 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,7 +1,9 @@
-[v1.9.3](https://github.com/nextcloud/nextcloudpi/commit/94bdbc3) (2019-03-09) wizard: fix headers
+[v1.9.4](https://github.com/nextcloud/nextcloudpi/commit/97fe6a9) (2019-03-09) unattended upgrades: update labels
-[v1.9.2](https://github.com/nextcloud/nextcloudpi/commit/1a46667) (2019-03-08) cleanup update.sh
+[v1.9.3](https://github.com/nextcloud/nextcloudpi/commit/f5ba0b1) (2019-03-09) wizard: fix headers
+
+[v1.9.2 ](https://github.com/nextcloud/nextcloudpi/commit/1a46667) (2019-03-08) cleanup update.sh
[v1.9.1 ](https://github.com/nextcloud/nextcloudpi/commit/060f004) (2019-03-03) fix LE cron
diff --git a/update.sh b/update.sh
index 5774df13..8f2e4f18 100755
--- a/update.sh
+++ b/update.sh
@@ -198,6 +198,9 @@ EOF
bash -c "sleep 3 && service php$PHPVER-fpm restart" &
}
+ # update unattended labels
+ is_active_app unattended-upgrades && run_app unattended-upgrades
+
# remove redundant opcache configuration. Leave until update bug is fixed -> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815968
# Bug #416 reappeared after we moved to php7.2 and debian buster packages. (keep last)
[[ "$( ls -l /etc/php/7.2/fpm/conf.d/*-opcache.ini | wc -l )" -gt 1 ]] && rm "$( ls /etc/php/7.2/fpm/conf.d/*-opcache.ini | tail -1 )"