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>2017-08-10 02:02:11 +0300
committernachoparker <nacho@ownyourbits.com>2017-08-11 00:17:56 +0300
commit390b313025705e2817dd73970d078d13c1352949 (patch)
treebb43774e75b5b28bbe1372c87f3d8ee1a0744e92
parent3dd9945fd64e9b1049dfe0fe7b87239c8465b0ab (diff)
nc-restore: dont destroy existing datadirv0.19.3
-rw-r--r--etc/nextcloudpi-config.d/nc-restore.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/nextcloudpi-config.d/nc-restore.sh b/etc/nextcloudpi-config.d/nc-restore.sh
index 5b320303..071a2f52 100644
--- a/etc/nextcloudpi-config.d/nc-restore.sh
+++ b/etc/nextcloudpi-config.d/nc-restore.sh
@@ -80,7 +80,7 @@ EOF
local DATADIR=$( grep datadirectory $BASEDIR/nextcloud/config/config.php | awk '{ print $3 }' | grep -oP "[^']*[^']" | head -1 )
[[ "$DATADIR" == "" ]] && { echo -e "Error reading data directory"; return 1; }
echo -e "restore datadir to $DATADIR..."
- rm -rf "$DATADIR"
+ test -e "$DATADIR" && mv "$DATADIR" "$DATADIR-$( date "+%m-%d-%y" )"
mkdir -p "$( dirname "$DATADIR" )"
mv "$TMPDIR/$( basename "$DATADIR" )" "$DATADIR"
sudo -u www-data php occ maintenance:mode --off