From af15c0feeaf4c7babfcead6d2639cc85f4210759 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Wed, 22 Mar 2023 14:42:17 +0100 Subject: [PATCH] Clean code --- nextcloud/CHANGELOG.md | 2 -- nextcloud/config.json | 2 +- nextcloud/rootfs/etc/cont-init.d/02-init_steps.sh | 4 ++-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/nextcloud/CHANGELOG.md b/nextcloud/CHANGELOG.md index a883cb9a4..ec15af077 100644 --- a/nextcloud/CHANGELOG.md +++ b/nextcloud/CHANGELOG.md @@ -1,5 +1,3 @@ -### 25.0.4-10 (22-03-2023) -- Minor bugs fixed - Implemented safety check that reinstalls nextcloud if issue detected https://github.com/alexbelgium/hassio-addons/issues/764 - Implemented healthcheck - Redirect crond errors to addon logs diff --git a/nextcloud/config.json b/nextcloud/config.json index 985404a13..ca34a6442 100644 --- a/nextcloud/config.json +++ b/nextcloud/config.json @@ -105,6 +105,6 @@ "slug": "nextcloud_ocr", "uart": true, "url": "https://github.com/alexbelgium/hassio-addons/tree/master/nextcloud", - "version": "25.0.4-10", + "version": "25.0.4-11", "webui": "https://[HOST]:[PORT:443]" } \ No newline at end of file diff --git a/nextcloud/rootfs/etc/cont-init.d/02-init_steps.sh b/nextcloud/rootfs/etc/cont-init.d/02-init_steps.sh index 1a05e207a..c5d4a50f5 100755 --- a/nextcloud/rootfs/etc/cont-init.d/02-init_steps.sh +++ b/nextcloud/rootfs/etc/cont-init.d/02-init_steps.sh @@ -21,8 +21,8 @@ done # Check if issues with installation echo "Checking installation" if [[ "$(occ --version)" == *"Composer autoloader not found"* ]]; then - bashio::log.fatal "Issue with installation detected, reinstallation will proceed" - if [ -f /data/config/www/nextcloud/index.php ]; then rm -r /data/config/www/nextcloud/index.php; fi + bashio::log.fatal "Issue with installation detected, reinstallation will proceed. Your files are copied in /share/nextcloud_backup_$(date +%F)" + mv /data/config/www/nextcloud /share/nextcloud_backup_$(date +%F) bashio::addon.restart fi