|
|
@ -246,6 +246,8 @@ nconf.argv().env().file({
|
|
|
|
file: path.join(__dirname, '/config.json')
|
|
|
|
file: path.join(__dirname, '/config.json')
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fs.open(path.join(__dirname, 'config.json'), 'r', function(err) {
|
|
|
|
|
|
|
|
if (!err) {
|
|
|
|
if (nconf.get('daemon') !== false) {
|
|
|
|
if (nconf.get('daemon') !== false) {
|
|
|
|
if (fs.existsSync(pidFilePath)) {
|
|
|
|
if (fs.existsSync(pidFilePath)) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
@ -274,3 +276,8 @@ async.series([
|
|
|
|
console.log('[loader] Error during startup: ' + err.message);
|
|
|
|
console.log('[loader] Error during startup: ' + err.message);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
// No config detected, kickstart web installer
|
|
|
|
|
|
|
|
var child = require('child_process').fork('app');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|