From 8ee7de6ff3df3329e52ec17a4bcd45ee446a400d Mon Sep 17 00:00:00 2001 From: Joshua Tauberer Date: Mon, 15 Jan 2018 13:28:18 -0500 Subject: [PATCH] no need to do a second apt-get update after 'installing' the PHP7 PPA if the PPA was already installed --- setup/system.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/setup/system.sh b/setup/system.sh index 1e8550ee..d26d4aac 100755 --- a/setup/system.sh +++ b/setup/system.sh @@ -129,12 +129,13 @@ apt_install python3 python3-dev python3-pip \ # Nextcloud requires PHP7, we will install the ppa from ubuntu php maintainer Ondřej Surý # The PPA is located here https://launchpad.net/%7Eondrej/+archive/ubuntu/php -# Unattended upgrades are activated for the repository - +# Unattended upgrades are activated for the repository If it appears it's already +# installed, don't do it again so we can avoid an unnecessary call to apt-get update. +if [ ! -f /etc/apt/sources.list.d/ondrej-php-trusty.list ]; then hide_output add-apt-repository -y ppa:ondrej/php apt_add_repository_to_unattended_upgrades LP-PPA-ondrej-php:trusty hide_output apt-get update - +fi # ### Suppress Upgrade Prompts # Since Mail-in-a-Box might jump straight to 18.04 LTS, there's no need