fixed order of operations
This commit is contained in:
parent
153599e6da
commit
d46bea0340
@ -1,18 +1,25 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if test -f latest.tar.bz2; then
|
if test -f latest.tar.bz2; then
|
||||||
rm latest.tar.bz2 #Removes incomplete or old downloads
|
rm latest.tar.bz2 #Removes incomplete or old downloads
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d "nextcloud.old" ]; then
|
if [ -d "nextcloud.old" ]; then
|
||||||
rm -r nextcloud.old #Removes old version of nextcloud
|
rm -r nextcloud.old #Removes old version of nextcloud
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sudo -u www-data php nextcloud/occ maintenance:mode --on
|
sudo -u www-data php nextcloud/occ maintenance:mode --on
|
||||||
mv nextcloud nextcloud.old
|
|
||||||
wget https://download.nextcloud.com/server/releases/latest.tar.bz2
|
wget https://download.nextcloud.com/server/releases/latest.tar.bz2
|
||||||
|
mv nextcloud nextcloud.old
|
||||||
tar xf latest.tar.bz2
|
tar xf latest.tar.bz2
|
||||||
rm latest.tar.bz2
|
rm latest.tar.bz2
|
||||||
|
|
||||||
mv nextcloud.old/config/config.php nextcloud/config
|
mv nextcloud.old/config/config.php nextcloud/config
|
||||||
mv nextcloud.old/data nextcloud
|
mv nextcloud.old/data nextcloud
|
||||||
|
|
||||||
sudo chown www-data:www-data -R nextcloud
|
sudo chown www-data:www-data -R nextcloud
|
||||||
|
|
||||||
sudo -u www-data php nextcloud/occ upgrade
|
sudo -u www-data php nextcloud/occ upgrade
|
||||||
sudo -u www-data php nextcloud/occ maintenance:mode --off
|
sudo -u www-data php nextcloud/occ maintenance:mode --off
|
||||||
sudo -u www-data php nextcloud/occ db:add-missing-indices
|
sudo -u www-data php nextcloud/occ db:add-missing-indices
|
||||||
|
Loading…
x
Reference in New Issue
Block a user