diff --git a/etc/ncp-config.d/DDNS_no-ip.sh b/etc/ncp-config.d/DDNS_no-ip.sh index 561888b6..0e5b0478 100644 --- a/etc/ncp-config.d/DDNS_no-ip.sh +++ b/etc/ncp-config.d/DDNS_no-ip.sh @@ -20,11 +20,8 @@ Internet access is required for this configuration to complete." install() { - # workaround until Sury has PHP7.2-redis armhf - [[ "$(uname -m)" == "x86_64" ]] && local RELEASE=stretch || local RELEASE=buster - apt-get update - apt-get install -t $RELEASE --no-install-recommends -y make gcc libc-dev + apt-get install --no-install-recommends -y make gcc libc-dev local TMPDIR="$( mktemp -d /tmp/noip.XXXXXX )" cd "$TMPDIR" diff --git a/etc/ncp-config.d/nc-nextcloud.sh b/etc/ncp-config.d/nc-nextcloud.sh index 0a396aa9..b4b07fd8 100644 --- a/etc/ncp-config.d/nc-nextcloud.sh +++ b/etc/ncp-config.d/nc-nextcloud.sh @@ -38,14 +38,15 @@ install() # During build, this step is run before ncp.sh. Avoid executing twice [[ -f /usr/lib/systemd/system/nc-provisioning.service ]] && return 0 - # workaround until Sury has PHP7.2-redis armhf - [[ "$(uname -m)" == "x86_64" ]] && local RELEASE=stretch || local RELEASE=buster + local RELEASE=stretch # Optional packets for Nextcloud and Apps apt-get update $APTINSTALL lbzip2 iputils-ping $APTINSTALL -t $RELEASE php-smbclient # for external storage - $APTINSTALL -t $RELEASE imagemagick php-imagick php${PHPVER}-exif # for gallery + [[ "$(uname -m)" == "x86_64" ]] && { + $APTINSTALL -t $RELEASE imagemagick php-imagick php${PHPVER}-exif # for gallery + } # TODO fixme when armhf version is available for php7.2 # POSTFIX diff --git a/etc/ncp-config.d/samba.sh b/etc/ncp-config.d/samba.sh index c7f1b1cb..aac737dd 100644 --- a/etc/ncp-config.d/samba.sh +++ b/etc/ncp-config.d/samba.sh @@ -20,11 +20,8 @@ This can be done manually or automatically using 'nc-scan' and 'nc-scan-auto'" install() { - # workaround until Sury has PHP7.2-redis armhf - [[ "$(uname -m)" == "x86_64" ]] && local RELEASE=stretch || local RELEASE=buster - apt-get update - apt-get install --no-install-recommends -y -t $RELEASE samba + apt-get install --no-install-recommends -y samba update-rc.d smbd disable update-rc.d nmbd disable diff --git a/lamp.sh b/lamp.sh index 2950bf23..bad8d66d 100644 --- a/lamp.sh +++ b/lamp.sh @@ -28,29 +28,11 @@ install() # GET PHP 7.2 SOURCES ########################################## - # workaround until Sury has PHP7.2-redis armhf - [[ "$(uname -m)" == "x86_64" ]] && local RELEASE=stretch || local RELEASE=buster - - ## Raspbian - if [[ -f /usr/bin/raspi-config ]]; then - echo "deb http://mirrordirector.raspbian.org/raspbian/ buster main contrib non-free rpi" > /etc/apt/sources.list.d/ncp-buster.list - - ## x86 - elif [[ "$(uname -m)" == "x86_64" ]]; then - apt-get update - $APTINSTALL apt-transport-https gnupg2 wget ca-certificates - echo "deb https://packages.sury.org/php/ stretch main" > /etc/apt/sources.list.d/php.list - wget -q https://packages.sury.org/php/apt.gpg -O- | apt-key add - - - ## armhf - else - echo "deb http://deb.debian.org/debian buster main contrib non-free" > /etc/apt/sources.list.d/ncp-buster.list - cat > /etc/apt/preferences.d/10-ncp-buster < /etc/apt/sources.list.d/php.list + wget -q https://packages.sury.org/php/apt.gpg -O- | apt-key add - # INSTALL ########################################## diff --git a/update.sh b/update.sh index 4e563db0..89d01269 100755 --- a/update.sh +++ b/update.sh @@ -190,29 +190,6 @@ EOF } EOF - # Adjust sources - ## Raspbian - if [[ -f /usr/bin/raspi-config ]]; then - echo "deb http://mirrordirector.raspbian.org/raspbian/ buster main contrib non-free rpi" > /etc/apt/sources.list.d/ncp-buster.list - - ## x86 - elif [[ "$(uname -m)" == "x86_64" ]]; then - apt-get update - apt-get install -y --no-install-recommends apt-transport-https gnupg - echo "deb https://packages.sury.org/php/ stretch main" > /etc/apt/sources.list.d/php.list - wget -q https://packages.sury.org/php/apt.gpg -O- | apt-key add - - rm -f /etc/apt/preferences.d/10-ncp-buster - - ## armhf - else - echo "deb http://deb.debian.org/debian buster main contrib non-free" > /etc/apt/sources.list.d/ncp-buster.list - cat > /etc/apt/preferences.d/10-ncp-buster < https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815968 # Bug #416 reappeared after we moved to php7.2 and debian buster packages. [[ "$( 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 )" @@ -230,6 +207,15 @@ launch_script $1 EOF chmod 700 /home/www/ncp-launcher.sh + # Adjust sources + apt-get update + apt-get install -y --no-install-recommends apt-transport-https gnupg + echo "deb https://packages.sury.org/php/ stretch main" > /etc/apt/sources.list.d/php.list + wget -q https://packages.sury.org/php/apt.gpg -O- | apt-key add - + rm -f /etc/apt/sources.list.d/ncp-buster.list + rm -f /etc/apt/preferences.d/10-ncp-buster + apt-get update + } # end - only live updates exit 0