mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-08 17:01:28 +02:00
Merge pull request #701 from aonz1982/install_automated_setup
Install automated setup
This commit is contained in:
@@ -134,6 +134,11 @@ var async = require('async'),
|
||||
return next(new Error('unknown database : ' + config.database));
|
||||
}
|
||||
|
||||
var allQuestions = install.redisQuestions.concat(install.mongoQuestions);
|
||||
for(var x=0;x<allQuestions.length;x++) {
|
||||
delete config[allQuestions[x].name];
|
||||
}
|
||||
|
||||
config.bcrypt_rounds = 12;
|
||||
config.upload_path = '/public/uploads';
|
||||
config.use_port = config.use_port.slice(0, 1) === 'y';
|
||||
@@ -258,6 +263,21 @@ var async = require('async'),
|
||||
}, function (err) {
|
||||
meta.configs.init(next);
|
||||
});
|
||||
|
||||
if (install.values) {
|
||||
if (install.values['social:twitter:key'] && install.values['social:twitter:secret']) {
|
||||
meta.configs.setOnEmpty('social:twitter:key', install.values['social:twitter:key']);
|
||||
meta.configs.setOnEmpty('social:twitter:secret', install.values['social:twitter:secret']);
|
||||
}
|
||||
if (install.values['social:google:id'] && install.values['social:google:secret']) {
|
||||
meta.configs.setOnEmpty('social:google:id', install.values['social:google:id']);
|
||||
meta.configs.setOnEmpty('social:google:secret', install.values['social:google:secret']);
|
||||
}
|
||||
if (install.values['social:facebook:key'] && install.values['social:facebook:secret']) {
|
||||
meta.configs.setOnEmpty('social:facebook:app_id', install.values['social:facebook:app_id']);
|
||||
meta.configs.setOnEmpty('social:facebook:secret', install.values['social:facebook:secret']);
|
||||
}
|
||||
}
|
||||
},
|
||||
function (next) {
|
||||
// Check if an administrator needs to be created
|
||||
|
||||
Reference in New Issue
Block a user