From e18babbbde10d0a90d82654ab4eb773e8cdf9369 Mon Sep 17 00:00:00 2001 From: Simon L Date: Thu, 2 Feb 2023 19:41:41 +0100 Subject: [PATCH] also fail the installation if appdata could not get created Signed-off-by: Simon L --- Containers/nextcloud/entrypoint.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Containers/nextcloud/entrypoint.sh b/Containers/nextcloud/entrypoint.sh index e4d2b36a..6bdb5f2e 100644 --- a/Containers/nextcloud/entrypoint.sh +++ b/Containers/nextcloud/entrypoint.sh @@ -204,17 +204,17 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then echo "Installing with PostgreSQL database" INSTALL_OPTIONS+=(--database pgsql --database-name "$POSTGRES_DB" --database-user "$POSTGRES_USER" --database-pass "$POSTGRES_PASSWORD" --database-host "$POSTGRES_HOST") - echo "starting nextcloud installation" + echo "Starting Nextcloud installation..." max_retries=10 try=0 until php /var/www/html/occ maintenance:install "${INSTALL_OPTIONS[@]}" || [ "$try" -gt "$max_retries" ] do - echo "retrying install..." + echo "Retrying install..." try=$((try+1)) sleep 10s done - if [ "$try" -gt "$max_retries" ]; then - echo "installing of nextcloud failed!" + if [ "$try" -gt "$max_retries" ] || [ -z "$(find "$NEXTCLOUD_DATA_DIR/" -maxdepth 1 -mindepth 1 -type d -name "appdata_*")" ]; then + echo "Installation of Nextcloud failed!" touch "$NEXTCLOUD_DATA_DIR/install.failed" exit 1 fi