From 0f706ddc845997f7003498cb0629ea4d23ae0a47 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Mon, 3 Apr 2023 14:22:59 +0200 Subject: [PATCH] Improve detection logic --- nextcloud/rootfs/etc/cont-init.d/02-init_steps.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 3bc5fbe21..cf254d13b 100755 --- a/nextcloud/rootfs/etc/cont-init.d/02-init_steps.sh +++ b/nextcloud/rootfs/etc/cont-init.d/02-init_steps.sh @@ -54,7 +54,7 @@ if [[ $($LAUNCHER -V 2>&1) == *"not installed"* ]] || [ ! -f /data/config/www/ne touch /notinstalled exit 0 # Is there missing files -elif [[ $($LAUNCHER -V 2>&1) == *"Composer autoloader not found"* ]]; then +elif [[ $($LAUNCHER -V 2>&1) == *"Composer autoloader not found"* ]] || [[ $($LAUNCHER -V 2>&1) == *"No such file"* ]] ; then bashio::log.red "--------------------------------------------------" bashio::log.red " Missing files detected, Nextcloud will reinstall " bashio::log.red "--------------------------------------------------" @@ -64,7 +64,7 @@ elif [[ $($LAUNCHER -V 2>&1) == *"Composer autoloader not found"* ]]; then sudo -u abc -s /bin/bash -c "php /data/config/www/nextcloud/occ upgrade" sudo -u abc -s /bin/bash -c "php /data/config/www/nextcloud/occ maintenance:mode --off" # Everything is fine -elif [[ $($LAUNCHER -V 2>&1) == *"Nextcloud"* ]]; then +elif [[ $($LAUNCHER -V 2>&1) =~ ^"Nextcloud "[0-9].* ]]; then # Log bashio::log.green "----------------------------------------" bashio::log.green " Nextcloud $CURRENTVERSION is installed "