Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ncp-provisioning.sh')
-rw-r--r--bin/ncp-provisioning.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/ncp-provisioning.sh b/bin/ncp-provisioning.sh
index 7316fa4b..ed79f665 100644
--- a/bin/ncp-provisioning.sh
+++ b/bin/ncp-provisioning.sh
@@ -56,7 +56,9 @@ run_app nc-limits
BKP="$( ls -1t /var/www/nextcloud-bkp_*.tar.gz 2>/dev/null | head -1 )"
[[ -f "$BKP" ]] && [[ "$( stat -c %U "$BKP" )" == "root" ]] && [[ "$( stat -c %a "$BKP" )" == 600 ]] && {
echo "Detected interrupted upgrade. Restoring..."
- ncp-restore "$BKP" && rm "$BKP"
+ BKP_NEW="failed_$BKP"
+ mv "$BKP" "$BKP_NEW"
+ ncp-restore "$BKP_NEW" && rm "$BKP_NEW"
}
exit 0