diff options
author | nachoparker <nacho@ownyourbits.com> | 2017-07-30 19:16:21 +0300 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2017-08-11 00:17:56 +0300 |
commit | 74c0f57d38b3e78d26419d23a8619d63a923ada5 (patch) | |
tree | 0bb2c666c4c2399f5fd703e43436dab3bf4c55ce /etc/nextcloudpi-config.d/nc-init.sh | |
parent | 6257eb6b6d5cca2463b512749a32f1c9efb2cbbb (diff) |
fix ncadmin passwordv0.17.21
Diffstat (limited to 'etc/nextcloudpi-config.d/nc-init.sh')
-rw-r--r-- | etc/nextcloudpi-config.d/nc-init.sh | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/etc/nextcloudpi-config.d/nc-init.sh b/etc/nextcloudpi-config.d/nc-init.sh index a1d387a4..b0107e0a 100644 --- a/etc/nextcloudpi-config.d/nc-init.sh +++ b/etc/nextcloudpi-config.d/nc-init.sh @@ -16,7 +16,8 @@ # ADMINUSER_=admin -DBADMIN_=ncadmin +ADMINPASS_=ownyourbits +DBADMIN=ncadmin DESCRIPTION="(Re)initiate Nextcloud to a clean configuration" show_info() @@ -53,10 +54,10 @@ DROP DATABASE IF EXISTS nextcloud; CREATE DATABASE nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -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 @@ -67,8 +68,8 @@ EOF cd /var/www/nextcloud/ rm -f config/config.php sudo -u www-data php occ maintenance:install --database \ - "mysql" --database-name "nextcloud" --database-user "$DBADMIN_" --database-pass \ - "$DBPASSWD" --admin-user "$ADMINUSER_" --admin-pass "$DBPASSWD" + "mysql" --database-name "nextcloud" --database-user "$DBADMIN" --database-pass \ + "$DBPASSWD" --admin-user "$ADMINUSER_" --admin-pass "$ADMINPASS_" # cron jobs sudo -u www-data php occ background:cron |