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:
authornachoparker <nacho@ownyourbits.com>2018-05-15 08:23:39 +0300
committernachoparker <nacho@ownyourbits.com>2018-05-15 08:45:49 +0300
commit88dcfefedb291e4aa74e22708b7230da68b0cc7a (patch)
tree33d911a63c6bdaa1739ae3b2fb811177cf8e8727
parent9bd6f81fb60fed3fc49cfee8515972ecc232583a (diff)
nc-update-nextcloud: rollback in case of power cutv0.56.1
-rw-r--r--bin/ncp-provisioning.sh7
-rw-r--r--changelog.md6
2 files changed, 11 insertions, 2 deletions
diff --git a/bin/ncp-provisioning.sh b/bin/ncp-provisioning.sh
index 8b13a5db..98da3290 100644
--- a/bin/ncp-provisioning.sh
+++ b/bin/ncp-provisioning.sh
@@ -74,6 +74,13 @@ PHPTHREADS=0
" &>/dev/null &
}
+## Check for interrupted upgrades and rollback
+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"
+}
+
## Fix permissions on NCP folders. The main reason for this is to make devel docker container work
CONFDIR="/usr/local/etc/ncp-config.d/"
[[ -e $CONFDIR ]] && {
diff --git a/changelog.md b/changelog.md
index d18ac594..c392270d 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,7 +1,9 @@
-[v0.56.0](https://github.com/nextcloud/nextcloudpi/commit/febbb00) (2018-05-15) added nc-autoupdate-nc
+[v0.56.1](https://github.com/nextcloud/nextcloudpi/commit/ef49d0e) (2018-05-15) nc-update-nextcloud: rollback in case of power cut
-[v0.55.4](https://github.com/nextcloud/nextcloudpi/commit/ef88be9) (2018-05-15) nc-autoupdate-ncp: fix wrong user
+[v0.56.0](https://github.com/nextcloud/nextcloudpi/commit/3c56aa8) (2018-05-15) added nc-autoupdate-nc
+
+[v0.55.4 ](https://github.com/nextcloud/nextcloudpi/commit/ef88be9) (2018-05-15) nc-autoupdate-ncp: fix wrong user
[v0.55.3 ](https://github.com/nextcloud/nextcloudpi/commit/a57c9f6) (2018-05-15) nc-update-netcloud: include version in backup name