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-07-29 12:12:12 +0300
committernachoparker <nacho@ownyourbits.com>2017-08-11 00:17:56 +0300
commit530e3a1e06a7fac91d92b4eada4b121879d4501b (patch)
treedf2cc3cc33236de66ad0b3c7619370cfc24e70fc /etc/nextcloudpi-config.d/nc-restore.sh
parent558e3a5029ce0fe0a68c724389ddb93b1944f532 (diff)
randomize database password (fixes)v0.17.18
Diffstat (limited to 'etc/nextcloudpi-config.d/nc-restore.sh')
-rw-r--r--etc/nextcloudpi-config.d/nc-restore.sh3
1 files changed, 1 insertions, 2 deletions
diff --git a/etc/nextcloudpi-config.d/nc-restore.sh b/etc/nextcloudpi-config.d/nc-restore.sh
index f753ef8c..ec9c18c4 100644
--- a/etc/nextcloudpi-config.d/nc-restore.sh
+++ b/etc/nextcloudpi-config.d/nc-restore.sh
@@ -39,8 +39,6 @@ You can use nc-backup " \
configure()
{
- local DBPASSWD=$( cat /root/.dbpass )
-
[ -f $BACKUPFILE_ ] || { echo -e "$BACKUPFILE_ not found"; return 1; }
[ -d $BASEDIR_ ] || { echo -e "$BASEDIR_ not found"; return 1; }
[ -d $BASEDIR_/nextcloud ] && { echo -e "WARNING: overwriting old instance"; }
@@ -55,6 +53,7 @@ configure()
tar -xf $BACKUPFILE_ || return 1
# RE-CREATE DATABASE TABLE
+ local DBPASSWD=$( grep password /root/.my.cnf | cut -d= -f2 )
echo -e "restore database..."
mysql -u root -p$DBPASSWD <<EOF
DROP DATABASE IF EXISTS nextcloud;