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');