hs.scripts/updates/nextcloud.sh
2024-04-25 13:49:12 +02:00

25 lines
688 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/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