Skip to content

Commit

Permalink
cleans things up a little
Browse files Browse the repository at this point in the history
  • Loading branch information
arlolra committed Jun 17, 2011
1 parent e375ca8 commit 96a518d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 21 deletions.
21 changes: 1 addition & 20 deletions bin/haraka
Original file line number Diff line number Diff line change
Expand Up @@ -294,26 +294,7 @@ 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'));

var logger = require(path.join(base, 'logger'))
server = require(path.join(base, 'server'));

process.on('uncaughtException', function (err) {
if (err.stack) {
err.stack.split("\n").forEach(logger.logcrit);
}
else {
logger.logcrit('Caught exception: ' + err);
}
if (!server.ready) {
logger.logcrit('Server not ready yet. Stopping.');
process.exit();
}
});

logger.log("Starting up Haraka version " + ver);
server.createServer();
require(path.join(base, 'haraka.js'));

}
else if (parsed.install) {
Expand Down
4 changes: 3 additions & 1 deletion haraka.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ var fs = require('fs');
var logger = require('./logger');
var server = require('./server');

exports.version = JSON.parse(fs.readFileSync('./package.json', 'utf8')).version;
exports.version = JSON.parse(
fs.readFileSync(path.join(__dirname, './package.json'), 'utf8')
).version;

process.on('uncaughtException', function (err) {
if (err.stack) {
Expand Down

0 comments on commit 96a518d

Please sign in to comment.