From 967adaf82f53e42387c0d3da3ed849d2b658f449 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Thu, 23 Mar 2023 23:52:23 +0100 Subject: [PATCH] Update 02-init_steps.sh --- nextcloud/rootfs/etc/cont-init.d/02-init_steps.sh | 5 +++-- 1 file changed, 3 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 795a6c989..26a043a28 100755 --- a/nextcloud/rootfs/etc/cont-init.d/02-init_steps.sh +++ b/nextcloud/rootfs/etc/cont-init.d/02-init_steps.sh @@ -49,7 +49,8 @@ if [ -f /reinstall ]; then bashio::log.fatal "... done" else - if [[ ! "$CURRENTVERSION" == "$(cat /nextcloudversion)" ]]; then + function version { echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; } + if [ "$(version "$(cat /nextcloudversion)")" -ge "$(version "$CURRENTVERSION") ]; then bashio::log.warning "Nexctloud $CURRENTVERSION is installed but $(cat /nextcloudversion) is in this container" if bashio::config.true 'auto_updater'; then bashio::log.warning "auto_updater configured, update starts now" @@ -57,7 +58,7 @@ else else bashio::log.warning "auto_updater not set in addon options, please update from nextcloud settings" fi - fi + fi || true fi ######################################