mirror of
https://github.com/nextcloud/nextcloudpi.git
synced 2026-01-10 15:12:01 -03:30
unattended upgrades: update labels
This commit is contained in:
parent
6eecf132ff
commit
0c95243d8f
@ -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)"
|
||||
}
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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 )"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user