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 'etc/nextcloudpi-config.d/nc-restore.sh')
-rw-r--r--etc/nextcloudpi-config.d/nc-restore.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/etc/nextcloudpi-config.d/nc-restore.sh b/etc/nextcloudpi-config.d/nc-restore.sh
index c99a41ad..2c8e6cfe 100644
--- a/etc/nextcloudpi-config.d/nc-restore.sh
+++ b/etc/nextcloudpi-config.d/nc-restore.sh
@@ -19,7 +19,7 @@
BACKUPFILE_=/media/USBdrive/nextcloud-bkp_xxxxxxxx.tar
BASEDIR_=/var/www
-DBADMIN_=ncadmin
+DBADMIN=ncadmin
DESCRIPTION="Restore a previously backuped NC instance"
show_info()
@@ -60,10 +60,10 @@ configure()
mysql -u root -p$DBPASSWD <<EOF
DROP DATABASE IF EXISTS nextcloud;
CREATE DATABASE nextcloud;
-GRANT USAGE ON *.* TO '$DBADMIN_'@'localhost' IDENTIFIED BY '$DBPASSWD';
-DROP USER '$DBADMIN_'@'localhost';
-CREATE USER '$DBADMIN_'@'localhost' IDENTIFIED BY '$DBPASSWD';
-GRANT ALL PRIVILEGES ON nextcloud.* TO $DBADMIN_@localhost;
+GRANT USAGE ON *.* TO '$DBADMIN'@'localhost' IDENTIFIED BY '$DBPASSWD';
+DROP USER '$DBADMIN'@'localhost';
+CREATE USER '$DBADMIN'@'localhost' IDENTIFIED BY '$DBPASSWD';
+GRANT ALL PRIVILEGES ON nextcloud.* TO $DBADMIN@localhost;
EXIT
EOF
[ $? -ne 0 ] && { echo -e "Error configuring nextcloud database"; return 1; }