From e375ca8d9efd0e8a33c3482652f13d1f3b695845 Mon Sep 17 00:00:00 2001 From: arlolra Date: Thu, 16 Jun 2011 19:06:22 -0700 Subject: [PATCH] fix cluster when running w/ a custom config dir --- bin/haraka | 1 + haraka.js | 3 +++ 2 files changed, 4 insertions(+) diff --git a/bin/haraka b/bin/haraka index ee0b4fd45..a96b8d4be 100755 --- a/bin/haraka +++ b/bin/haraka @@ -292,6 +292,7 @@ else if (parsed.configs && parsed.plugin) { } else if (parsed.configs) { + process.argv[1] = path.join(__dirname, '../haraka.js'); process.env.HARAKA = parsed.configs; require.paths.unshift(path.join(process.env.HARAKA, 'node_modules')); diff --git a/haraka.js b/haraka.js index 72e114de1..c0b12178b 100644 --- a/haraka.js +++ b/haraka.js @@ -1,5 +1,8 @@ #!/usr/bin/env node +var path = require('path'); +require.paths.unshift(path.join(process.env.HARAKA, 'node_modules')); + var fs = require('fs'); var logger = require('./logger'); var server = require('./server');