From 4e68da54b131646b6d047ff5b87e031d4ccb6fbd Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Tue, 20 Jun 2023 09:52:43 +0200 Subject: [PATCH] Update 98-upgrade.sh --- nextcloud/rootfs/etc/cont-init.d/98-upgrade.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/nextcloud/rootfs/etc/cont-init.d/98-upgrade.sh b/nextcloud/rootfs/etc/cont-init.d/98-upgrade.sh index 814d02418..4471ce517 100755 --- a/nextcloud/rootfs/etc/cont-init.d/98-upgrade.sh +++ b/nextcloud/rootfs/etc/cont-init.d/98-upgrade.sh @@ -17,13 +17,12 @@ CONTAINERVERSION="$(cat /nextcloudversion)" # Inform if new version available function version { echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; } -# Updater code -if ! bashio::config.true "disable_updates"; then +# Updater nextcloud code +if ! bashio::config.true "disable_updates_nextcloud"; then bashio::log.green "Auto_updater set, checking for updates" # Install new version sudo -u abc -s /bin/bash -c "php /data/config/www/nextcloud/updater/updater.phar --no-interaction" 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 app:update --all" # Install additional versions while [[ $(occ update:check 2>&1) == *"update available"* ]]; do bashio::log.yellow "-----------------------------------------------------------------------" @@ -45,3 +44,11 @@ elif bashio::config.true "disable_updates" && [ "$(version "$CONTAINERVERSION")" bashio::log.warning " " bashio::log.warning "-----------------------------------------" fi + +# Updater apps code +if ! bashio::config.true "disable_updates"; then + bashio::log.green "... checking for app updates" + sudo -u abc -s /bin/bash -c "php /data/config/www/nextcloud/occ app:update --all" +else + bashio::log.yellow "... disable_updates set, apps need to be updated manually" +fi