2022-11-08 23:40:12 +01:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
# Update nextcloud
|
2022-11-08 23:42:39 +01:00
|
|
|
# place in /etc/cron.daily and make executable with chmod +x /etc/cron.daily/nextcloud-update
|
2022-11-08 23:40:12 +01:00
|
|
|
user=www-data
|
|
|
|
phpversion=php8.0
|
|
|
|
path=/var/www/nextcloud
|
|
|
|
|
|
|
|
alias ncc="sudo -u $user $phpversion $path/occ"
|
|
|
|
alias updater="sudo -u $user $phpversion $path/updater/updater.phar"
|
|
|
|
|
|
|
|
updater --no-backup --no-interaction
|
|
|
|
|
|
|
|
subcommands=("db:add-missing-primary-keys" "db:add-missing-indices" "db:add-missing-columns" "db:convert-filecache-bigint" "files:scan-app-data" "--quiet --all app:update" "upgrade")
|
|
|
|
for cmd in ${subcommands[@]}; do
|
|
|
|
ncc -n $cmd
|
|
|
|
done
|