Revert "[Helper] Install Nextcloud 20"

This reverts commit 5e7bacaeb4.
master
andryyy 2020-10-08 16:52:41 +02:00
parent d6688d918b
commit 31d5b85648
1 changed files with 4 additions and 3 deletions

View File

@ -69,11 +69,11 @@ elif [[ ${NC_UPDATE} == "y" ]]; then
if ! grep -q 'installed: true' <<<$(docker exec -it -u www-data $(docker ps -f name=php-fpm-mailcow -q) bash -c "/web/nextcloud/occ --no-warnings status"); then if ! grep -q 'installed: true' <<<$(docker exec -it -u www-data $(docker ps -f name=php-fpm-mailcow -q) bash -c "/web/nextcloud/occ --no-warnings status"); then
echo "Nextcloud seems not to be installed." echo "Nextcloud seems not to be installed."
exit 1 exit 1
elif ! grep -q 'version: 20\.' <<<$(docker exec -it -u www-data $(docker ps -f name=php-fpm-mailcow -q) bash -c "/web/nextcloud/occ --no-warnings status"); then elif ! grep -q 'version: 19\.' <<<$(docker exec -it -u www-data $(docker ps -f name=php-fpm-mailcow -q) bash -c "/web/nextcloud/occ --no-warnings status"); then
echo "Cannot upgrade to new major version, please update manually." echo "Cannot upgrade to new major version, please update manually."
exit 1 exit 1
else else
curl -L# -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/latest-20.tar.bz2" || { echo "Failed to download Nextcloud archive."; exit 1; } \ curl -L# -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/latest-19.tar.bz2" || { echo "Failed to download Nextcloud archive."; exit 1; } \
&& tar -xjf nextcloud.tar.bz2 -C ./data/web/ \ && tar -xjf nextcloud.tar.bz2 -C ./data/web/ \
&& rm nextcloud.tar.bz2 \ && rm nextcloud.tar.bz2 \
&& mkdir -p ./data/web/nextcloud/data \ && mkdir -p ./data/web/nextcloud/data \
@ -94,7 +94,7 @@ elif [[ ${NC_INSTALL} == "y" ]]; then
ADMIN_NC_PASS=$(</dev/urandom tr -dc A-Za-z0-9 | head -c 28) ADMIN_NC_PASS=$(</dev/urandom tr -dc A-Za-z0-9 | head -c 28)
curl -L# -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/latest-20.tar.bz2" || { echo "Failed to download Nextcloud archive."; exit 1; } \ curl -L# -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/latest-19.tar.bz2" || { echo "Failed to download Nextcloud archive."; exit 1; } \
&& tar -xjf nextcloud.tar.bz2 -C ./data/web/ \ && tar -xjf nextcloud.tar.bz2 -C ./data/web/ \
&& rm nextcloud.tar.bz2 \ && rm nextcloud.tar.bz2 \
&& mkdir -p ./data/web/nextcloud/data \ && mkdir -p ./data/web/nextcloud/data \
@ -107,6 +107,7 @@ elif [[ ${NC_INSTALL} == "y" ]]; then
--database-name ${DBNAME} \ --database-name ${DBNAME} \
--database-user ${DBUSER} \ --database-user ${DBUSER} \
--database-pass ${DBPASS} \ --database-pass ${DBPASS} \
--database-table-prefix nc_ \
--admin-user admin \ --admin-user admin \
--admin-pass ${ADMIN_NC_PASS} \ --admin-pass ${ADMIN_NC_PASS} \
--data-dir /web/nextcloud/data --data-dir /web/nextcloud/data