#!/bin/bash set -e # +x does not apply # use correct order – eg: sudo -u www-data php=php8.2 ... if [ -z ${php} ]; then php="php8.1" fi [ -f cron.log ] && rm -v cron.log && echo "logfiles should not be here and upset the updater. consider the data directory." $php occ maintenance:mode --on $php updater/updater.phar -v --no-backup --no-interaction $php occ db:add-missing-primary-keys --no-interaction $php occ db:add-missing-columns --no-interaction $php occ db:add-missing-indices --no-interaction $php occ db:convert-filecache-bigint --no-interaction $php occ app:update --all -n --no-ansi # since it appears to be unreliable at times $php occ maintenance:mode --off