From df316cf4c8159bcc2b930db9514dcfb79604ed2d Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sat, 25 Mar 2023 11:29:59 +0100 Subject: [PATCH] Update 02-init_steps.sh --- nextcloud/rootfs/etc/cont-init.d/02-init_steps.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 73bcfd269..f6c584c69 100755 --- a/nextcloud/rootfs/etc/cont-init.d/02-init_steps.sh +++ b/nextcloud/rootfs/etc/cont-init.d/02-init_steps.sh @@ -30,11 +30,20 @@ done # Check currently installed version CONTAINERVERSION="$(cat /nextcloudversion)" + +if [[ $($LAUNCHER -V 2>&1) == *"not installed"* ]]; then + bashio::log.yellow "--------------------------------------------------------------------" + bashio::log.yellow "Nextcloud is not installed, please install through webui then reboot" + bashio::log.yellow "--------------------------------------------------------------------" + exit 0 +fi + if [ -f /data/config/www/nextcloud/version.php ]; then CURRENTVERSION="$(sed -n "s|.*\OC_VersionString = '*\(.*[^ ]\) *';.*|\1|p" /data/config/www/nextcloud/version.php)" bashio::log.green "--------------------------------------" bashio::log.green "Nextcloud $CURRENTVERSION is installed" bashio::log.green "--------------------------------------" + else if [ -d /data/config/www/nextcloud ]; then rm -r /data/config/www/nextcloud; fi CURRENTVERSION="$CONTAINERVERSION" @@ -43,6 +52,7 @@ else bashio::log.green "--------------------------------------------------------------------------------------------------------------" bashio::log.green " " exit 0 + fi #########################