1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/nodebb_ynh.git synced 2024-09-03 19:46:29 +02:00

Update install

This commit is contained in:
frju365 2019-01-06 00:57:39 +01:00 committed by GitHub
parent 97b41a133f
commit 25e207f3c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -111,11 +111,11 @@ pushd $final_path
dbname=$app
dbuser=$app
dbpass=$(ynh_string_random)
mongo --shell "$dbname" --eval 'db.createUser( { user: "'${dbuser}'", pwd: "'${dbpass}'", roles: [ "readWrite" ] } );' <<< exit
mongo --shell "$dbname" --eval 'db.grantRolesToUser("'${dbuser}'",[{ role: "clusterMonitor", db: "admin" }]);' <<< exit
ynh_app_setting_set $app dbuser $dbuser
ynh_app_setting_set $app dbpass $dbpass
ynh_app_setting_set $app dbname $dbname
mongo --shell "$dbname" --eval 'db.createUser( { user: "'${dbuser}'", pwd: "'${dbpass}'", roles: [ "readWrite" ] } );' <<< exit
mongo --shell "$dbname" --eval 'db.grantRolesToUser("'${dbuser}'",[{ role: "clusterMonitor", db: "admin" }]);' <<< exit
popd
#=================================================