added checks for incomplete downloads
This commit is contained in:
		@@ -1,5 +1,10 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
rm -r nextcloud.old
 | 
			
		||||
if test -f latest.tar.bz2; then
 | 
			
		||||
    rm latest.tar.bz2    #Removes incomplete or old downloads
 | 
			
		||||
fi
 | 
			
		||||
if [ -d "nextcloud.old" ]; then
 | 
			
		||||
    rm -r nextcloud.old    #Removes old version of nextcloud
 | 
			
		||||
fi
 | 
			
		||||
sudo -u www-data php nextcloud/occ maintenance:mode --on
 | 
			
		||||
mv nextcloud nextcloud.old
 | 
			
		||||
wget https://download.nextcloud.com/server/releases/latest.tar.bz2
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user