diff --git a/nextcloud/CHANGELOG.md b/nextcloud/CHANGELOG.md index dc4c35741..ec15af077 100644 --- a/nextcloud/CHANGELOG.md +++ b/nextcloud/CHANGELOG.md @@ -1,3 +1,4 @@ +- 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 - Improve elasticsearch integration @@ -7,7 +8,9 @@ - Corrected elastisearch server definition and test ## 25.0.4 (25-02-2023) + - Update to latest version from linuxserver/docker-nextcloud + ## 25.0.3 (12-02-2023) - WARNING! : this is a major code update. Make sure to have a full update of /config, /share and your nextcloud addon before updating. I take no responsibility for lost data! diff --git a/nextcloud/config.json b/nextcloud/config.json index fa9164a87..c61061ff2 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-8", + "version": "25.0.4-9", "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 96bc6b922..2db813ea2 100755 --- a/nextcloud/rootfs/etc/cont-init.d/02-init_steps.sh +++ b/nextcloud/rootfs/etc/cont-init.d/02-init_steps.sh @@ -18,6 +18,13 @@ for var in /data/config/log/nginx/error.log /data/config/log/nginx/access.log /d ln -sf /proc/1/fd/1 "$var" done +# Check if issues with installation +if [[ "$(occ)" == *"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::addon.restart +fi + # Add new log info to config.php #for var in /defaults/config.php /data/config/www/nextcloud/config/config.php; do # sed -i "/logfile/d" "$var" diff --git a/nextcloud/rootfs/etc/cont-init.d/99-add_packages.sh b/nextcloud/rootfs/etc/cont-init.d/99-add_packages.sh index 769a8cede..f483f840b 100755 --- a/nextcloud/rootfs/etc/cont-init.d/99-add_packages.sh +++ b/nextcloud/rootfs/etc/cont-init.d/99-add_packages.sh @@ -4,7 +4,7 @@ # Install specific packages if [ ! -d /data/config/www/nextcloud/apps/pdfannotate ]; then CURRENT="$PWD" - cd /data/config/www/nextcloud/apps || exit + cd /data/config/www/nextcloud/apps &>/dev/null || exit git clone https://gitlab.com/nextcloud-other/nextcloud-annotate pdfannotate cd "$CURRENT" || exit apk add --no-cache ghostscript >/dev/null