From 5d3e9619fff63afad6e3f086c6bb49fa51d95515 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Wed, 29 Mar 2023 15:42:04 +0200 Subject: [PATCH] Update 02-init_steps.sh --- .../rootfs/etc/cont-init.d/02-init_steps.sh | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 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 a6c2b3b0c..b465d163a 100755 --- a/nextcloud/rootfs/etc/cont-init.d/02-init_steps.sh +++ b/nextcloud/rootfs/etc/cont-init.d/02-init_steps.sh @@ -93,21 +93,18 @@ function nextcloud_download { } # Updater code -if [ "$(version "$CONTAINERVERSION")" -gt "$(version "$CURRENTVERSION")" ]; then - bashio::log.yellow " " - bashio::log.yellow "New version available : $CONTAINERVERSION" - if bashio::config.true 'auto_updater'; then - bashio::log.green "... auto_updater configured, update starts now" +if bashio::config.true 'auto_updater'; then + bashio::log.green "Auto_updater set, checking for updates" + while [[ $(occ update:check 2>&1) == *"update available"* ]]; do + bashio::log.yellow " " + bashio::log.yellow "New version available" updater.phar --no-interaction &>/proc/1/fd/1 occ upgrade &>/proc/1/fd/1 - # For all versions, update - #for VERSION in seq "${CURRENTVERSION%%.*}" "${CONTAINERVERSION%%.*}"; do - # bashio::log.green "... installing version $VERSION" - # nextcloud_download "latest-$VERSION" - #done - else - bashio::log.yellow "...auto_updater not set in addon options, please update from nextcloud settings" - fi + done +elif [ "$(version "$CONTAINERVERSION")" -gt "$(version "$CURRENTVERSION")" ]; then + bashio::log.yellow " " + bashio::log.yellow "New version available : $CONTAINERVERSION" + bashio::log.yellow "...auto_updater not set in addon options, please update from nextcloud settings" fi ######################