diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 9b06a5b80b..40421790ad 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -4093,19 +4093,9 @@ _EOF_ Banner_Installing - if (( $DISTRO == 3 )); then - - INSTALL_URL_ADDRESS='https://download.owncloud.org/download/repositories/stable/Debian_8.0/Release.key' - - elif (( $DISTRO == 4 )); then - - INSTALL_URL_ADDRESS='https://download.owncloud.org/download/repositories/stable/Debian_9.0/Release.key' - - else - - INSTALL_URL_ADDRESS='https://download.owncloud.org/community/owncloud-latest.zip' - - fi + INSTALL_URL_ADDRESS="https://download.owncloud.org/download/repositories/stable/Debian_$(( $DISTRO + 5 )).0/Release.key" + # No repository available yet after Stretch, thus we choose archive here: + (( $DISTRO > 4 )) && INSTALL_URL_ADDRESS='https://download.owncloud.org/community/owncloud-latest.zip' /DietPi/dietpi/func/check_connection "$INSTALL_URL_ADDRESS" #Install @@ -4114,32 +4104,24 @@ _EOF_ # Install necessary PHP modules: https://doc.owncloud.org/server/latest/admin_manual/installation/source_installation.html#php-extensions AGI_ERROR_CHECKED "$PHP_APT_PACKAGE_NAME"-intl "$PHP_APT_PACKAGE_NAME"-redis - if [ ! -f /etc/apt/sources.list.d/owncloud.list ] && [ ! -d /var/www/owncloud ]; then + if [ ! -f /etc/apt/sources.list.d/owncloud.list ] && [ ! -f /var/www/owncloud/occ ]; then wget "$INSTALL_URL_ADDRESS" -O owncloud.key_or_zip - apt-key add - < owncloud.key_or_zip 2> /dev/null - unzip -o owncloud.key_or_zip -d /var/www 2> /dev/null - rm owncloud.key_or_zip - - if (( $DISTRO == 3 )); then + if (( $DISTRO < 5 )); then - echo -e 'deb https://download.owncloud.org/download/repositories/stable/Debian_8.0/ /' > /etc/apt/sources.list.d/owncloud.list + echo -e "deb https://download.owncloud.org/download/repositories/stable/Debian_$(( $DISTRO + 5 )).0/ /" > /etc/apt/sources.list.d/owncloud.list + apt-key add - < owncloud.key_or_zip && AGUP - elif (( $DISTRO == 4 )); then + else - echo -e 'deb https://download.owncloud.org/download/repositories/stable/Debian_9.0/ /' > /etc/apt/sources.list.d/owncloud.list + unzip -o owncloud.key_or_zip -d /var/www fi + rm owncloud.key_or_zip fi - # Install APT package just, if we have ownCloud's own up to date repository. - if [ -f /etc/apt/sources.list.d/owncloud.list ]; then - - AGUP - AGI_ERROR_CHECKED owncloud-files - - fi + [ -f /etc/apt/sources.list.d/owncloud.list ] && AGI_ERROR_CHECKED owncloud-files else @@ -4164,7 +4146,7 @@ _EOF_ # Install necessary PHP modules: https://docs.nextcloud.com/server/12/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation AGI_ERROR_CHECKED "$PHP_APT_PACKAGE_NAME"-intl "$PHP_APT_PACKAGE_NAME"-redis - if [ ! -d /var/www/nextcloud ]; then + if [ ! -f /var/www/nextcloud/occ ]; then wget "$INSTALL_URL_ADDRESS" -O package.zip unzip -o package.zip -d /var/www