mirror of
https://github.com/bashclub/zamba-lxc-toolbox.git
synced 2024-11-07 19:31:58 +01:00
Rework Nextcloud update script
This commit is contained in:
parent
7dc9ccec6e
commit
f99d1a2c66
36
updatenc
36
updatenc
@ -1,27 +1,17 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Update nextcloud
|
||||||
# place in /etc/cron.daily and make executable with chmod +x /etc/cron.daily/updatenc
|
# place in /etc/cron.daily and make executable with chmod +x /etc/cron.daily/updatenc
|
||||||
|
user=www-data
|
||||||
|
phpversion=php8.0
|
||||||
|
path=/var/www/nextcloud
|
||||||
|
|
||||||
sudo -u www-data php8.0 /var/www/nextcloud/updater/updater.phar --no-backup --no-interaction
|
alias ncc="sudo -u $user $phpversion $path/occ"
|
||||||
|
alias updater="sudo -u $user $phpversion $path/updater/updater.phar"
|
||||||
|
|
||||||
sudo -u www-data php8.0 /var/www/nextcloud/occ status
|
updater --no-backup --no-interaction
|
||||||
sudo -u www-data php8.0 /var/www/nextcloud/occ -V
|
|
||||||
|
|
||||||
sudo -u www-data php8.0 /var/www/nextcloud/occ db:add-missing-primary-keys
|
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
|
||||||
sudo -u www-data php8.0 /var/www/nextcloud/occ db:add-missing-indices
|
ncc -n $cmd
|
||||||
|
done
|
||||||
sudo -u www-data php8.0 /var/www/nextcloud/occ db:add-missing-columns
|
|
||||||
|
|
||||||
sudo -u www-data php8.0 /var/www/nextcloud/occ db:convert-filecache-bigint
|
|
||||||
|
|
||||||
sudo -u www-data php8.0 /var/www/nextcloud/occ files:scan-app-data
|
|
||||||
sudo -u www-data php8.0 /var/www/nextcloud/occ app:update --all
|
|
||||||
|
|
||||||
sudo -u www-data php8.0 /var/www/nextcloud/occ upgrade
|
|
||||||
|
|
||||||
/usr/sbin/service php8.0-fpm restart
|
|
||||||
/usr/sbin/service nginx restart
|
|
||||||
|
|
||||||
sudo -u www-data php8.0 /var/www/nextcloud/occ -V
|
|
||||||
|
Loading…
Reference in New Issue
Block a user