From 153599e6daee2014ee8d0e164cb399a90a1f00cd Mon Sep 17 00:00:00 2001 From: Mihit Date: Wed, 19 Mar 2025 11:20:15 +1100 Subject: [PATCH] added checks for incomplete downloads --- update.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/update.sh b/update.sh index 3b32d96..5fe0f33 100755 --- a/update.sh +++ b/update.sh @@ -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