make sure that all apps are up-to-date

Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
Simon L 2022-11-17 18:05:23 +01:00
parent 77a0717417
commit 374b7bf7a6

View file

@ -267,6 +267,8 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then
rm "$NEXTCLOUD_DATA_DIR/update.failed" rm "$NEXTCLOUD_DATA_DIR/update.failed"
bash /notify.sh "Nextcloud update to $image_version successful!" "Feel free to inspect the Nextcloud container logs for more info." bash /notify.sh "Nextcloud update to $image_version successful!" "Feel free to inspect the Nextcloud container logs for more info."
php /var/www/html/occ app:update --all
# Restore app status # Restore app status
if [ "${APPSTORAGE[0]}" != "no-export-done" ]; then if [ "${APPSTORAGE[0]}" != "no-export-done" ]; then
echo "Restoring the status of apps. This can take a while..." echo "Restoring the status of apps. This can take a while..."
@ -281,13 +283,15 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then
fi fi
# Only restore the group settings, if the app was enabled (and is thus compatible with the new NC version) # Only restore the group settings, if the app was enabled (and is thus compatible with the new NC version)
if [ "${APPSTORAGE[$app]}" != "yes" ]; then if [ "${APPSTORAGE[$app]}" != "yes" ]; then
nextcloud_occ_no_check config:app:set "$app" enabled --value="${APPSTORAGE[$app]}" php /var/www/html/occ config:app:set "$app" enabled --value="${APPSTORAGE[$app]}"
fi fi
fi fi
fi fi
done done
fi fi
php /var/www/html/occ app:update --all
# Apply optimization # Apply optimization
echo "Doing some optimizations..." echo "Doing some optimizations..."
php /var/www/html/occ maintenance:repair php /var/www/html/occ maintenance:repair