This commit is contained in:
Alexandre
2023-03-31 21:44:03 +02:00
parent 0e23abd45c
commit da8f0a00f6
3 changed files with 7 additions and 15 deletions

View File

@@ -20,8 +20,10 @@ function version { echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4
# Updater code
if ! bashio::config.true "disable_updates"; 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"
# Install additional versions
while [[ $(occ update:check 2>&1) == *"update available"* ]]; do
bashio::log.yellow "-----------------------------------------------------------------------"
bashio::log.yellow " new version available, updating. Please do not turn off your addon! "
@@ -29,14 +31,10 @@ if ! bashio::config.true "disable_updates"; then
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"
done
# Reset permissions
/./01-folders.sh
elif bashio::config.true "disable_updates" && [ "$(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
#####################
# RESET PERMISSIONS #
#####################
/./01-folders.sh