Skip to content

Node.js based forum software built for the modern web

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.

Julian Lam0ff09d8093ce
diff --git a/loader.js b/loader.js
index 9435b63f3a..5baf636dbf 100644
--- a/loader.js
+++ b/loader.js
@@ -9,11 +9,15 @@ var nconf = require('nconf'),
async = require('async'),
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 }),
- silent = process.env.NODE_ENV !== 'development',
+ silent = nconf.get('silent') !== false,
numProcs,
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) {
if (!err) {
if (nconf.get('daemon') !== false) {