mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 19:46:01 +01:00
changed the behaviour of --no-daemon so that it does not also pipe output to stdout, use new flag --no-silent for that. --no-daemon just does as it advertises, and doesn't daemonize the loader process before spawning app.js instances.
This commit is contained in:
14
loader.js
14
loader.js
@@ -9,11 +9,15 @@ var nconf = require('nconf'),
|
|||||||
async = require('async'),
|
async = require('async'),
|
||||||
logrotate = require('logrotate-stream'),
|
logrotate = require('logrotate-stream'),
|
||||||
|
|
||||||
pkg = require('./package.json'),
|
pkg = require('./package.json');
|
||||||
|
|
||||||
pidFilePath = __dirname + '/pidfile',
|
nconf.argv().env().file({
|
||||||
|
file: path.join(__dirname, '/config.json')
|
||||||
|
});
|
||||||
|
|
||||||
|
var pidFilePath = __dirname + '/pidfile',
|
||||||
output = logrotate({ file: __dirname + '/logs/output.log', size: '1m', keep: 3, compress: true }),
|
output = logrotate({ file: __dirname + '/logs/output.log', size: '1m', keep: 3, compress: true }),
|
||||||
silent = process.env.NODE_ENV !== 'development',
|
silent = nconf.get('silent') !== false,
|
||||||
numProcs,
|
numProcs,
|
||||||
workers = [],
|
workers = [],
|
||||||
|
|
||||||
@@ -242,10 +246,6 @@ Loader.notifyWorkers = function(msg, worker_pid) {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
nconf.argv().env().file({
|
|
||||||
file: path.join(__dirname, '/config.json')
|
|
||||||
});
|
|
||||||
|
|
||||||
fs.open(path.join(__dirname, 'config.json'), 'r', function(err) {
|
fs.open(path.join(__dirname, 'config.json'), 'r', function(err) {
|
||||||
if (!err) {
|
if (!err) {
|
||||||
if (nconf.get('daemon') !== false) {
|
if (nconf.get('daemon') !== false) {
|
||||||
|
|||||||
Reference in New Issue
Block a user