diff --git a/scripts/install b/scripts/install index 7fd1eaf..742f5ca 100644 --- a/scripts/install +++ b/scripts/install @@ -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 #=================================================