From 671db1681ecf477e5768b3d338f704df8e64c77b Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 20 May 2015 09:57:04 -0400 Subject: [PATCH] allowing usage of "false" in silent and daemon environment variables --- loader.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/loader.js b/loader.js index 5baf636dbf..c79756f09e 100644 --- a/loader.js +++ b/loader.js @@ -17,7 +17,7 @@ nconf.argv().env().file({ var pidFilePath = __dirname + '/pidfile', output = logrotate({ file: __dirname + '/logs/output.log', size: '1m', keep: 3, compress: true }), - silent = nconf.get('silent') !== false, + silent = nconf.get('silent') === 'false' ? false : nconf.get('silent') !== false, numProcs, workers = [], @@ -248,7 +248,7 @@ Loader.notifyWorkers = function(msg, worker_pid) { fs.open(path.join(__dirname, 'config.json'), 'r', function(err) { if (!err) { - if (nconf.get('daemon') !== false) { + if (nconf.get('daemon') !== 'false' && nconf.get('daemon') !== false) { if (fs.existsSync(pidFilePath)) { try { var pid = fs.readFileSync(pidFilePath, { encoding: 'utf-8' });