Skip to content

Commit

Permalink
DietPi-Software | ownCloud: Fix Buster installation and cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaIng authored Dec 19, 2017
1 parent af5a1f2 commit a8420ad
Showing 1 changed file with 12 additions and 30 deletions.
42 changes: 12 additions & 30 deletions dietpi/dietpi-software
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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
Expand Down

0 comments on commit a8420ad

Please sign in to comment.