set isPrimary to true if its undefined

isPrimary was undefined if you are using clustering by adding
isCluster:true to config.json, run 1 nodebb process on each virtual
machine and use app.js instead of loader.js
v1.18.x
Barış Soner Uşaklı 7 years ago
parent f51bab5d86
commit b2d7455f72

@ -42,6 +42,8 @@ function loadConfig(configFile) {
nconf.set('isPrimary', 'true'); nconf.set('isPrimary', 'true');
nconf.set('isCluster', 'false'); nconf.set('isCluster', 'false');
} }
var isPrimary = nconf.get('isPrimary');
nconf.set('isPrimary', isPrimary === undefined ? 'true' : isPrimary);
// Ensure themes_path is a full filepath // Ensure themes_path is a full filepath
nconf.set('themes_path', path.resolve(dirname, nconf.get('themes_path'))); nconf.set('themes_path', path.resolve(dirname, nconf.get('themes_path')));

Loading…
Cancel
Save