Skip to content

Commit

Permalink
[minor] Small updates after merging from kpdecker
Browse files Browse the repository at this point in the history
  • Loading branch information
indexzero committed Apr 19, 2011
1 parent 3beb6da commit be6de72
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
26 changes: 13 additions & 13 deletions bin/forever
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if (accepts.indexOf(process.argv[2]) !== -1) {
var argv = require('optimist').argv;
require.paths.unshift(path.join(__dirname, '..', 'lib'));

var forever = require('../lib/forever');
var forever = require('forever');

var help = [
"usage: forever [start | stop | restart | stopall | list | cleanlogs] [options] SCRIPT [script options]",
Expand All @@ -26,18 +26,18 @@ var help = [
" list list all running forever scripts",
" cleanlogs [CAREFUL] Deletes all historical forever log files",
"",
" -m MAX Only run the specified script MAX times",
" -l LOGFILE Logs the forever output to LOGFILE",
" -a, --append Append logs",
" -o OUTFILE Logs stdout from child script to OUTFILE",
" -e ERRFILE Logs stderr from child script to ERRFILE",
" -d SOURCEDIR The source directory for which SCRIPT is relative to",
" -p PATH Base path for all forever related files (pid files, etc.)",
" -c COMMAND COMMAND to execute (defaults to node)",
" --pidfile=PIDFILE The pid file",
" -v, --verbose Turns on the verbose messages from Forever",
" -s, --silent Run the child script silencing stdout and stderr",
" -h, --help You're staring at it",
" -m MAX Only run the specified script MAX times",
" -l LOGFILE Logs the forever output to LOGFILE",
" -a, --append Append logs",
" -o OUTFILE Logs stdout from child script to OUTFILE",
" -e ERRFILE Logs stderr from child script to ERRFILE",
" -d SOURCEDIR The source directory for which SCRIPT is relative to",
" -p PATH Base path for all forever related files (pid files, etc.)",
" -c COMMAND COMMAND to execute (defaults to node)",
" --pidfile The pid file",
" -v, --verbose Turns on the verbose messages from Forever",
" -s, --silent Run the child script silencing stdout and stderr",
" -h, --help You're staring at it",
"",
"[Long Running Process]",
" The forever process will continue to run outputting log messages to the console.",
Expand Down
5 changes: 3 additions & 2 deletions lib/forever.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ forever.load = function (options) {
return;
}

forever.config = config = options;
forever.config = config = options;

//
// Syncronously create the `root` directory
Expand Down Expand Up @@ -85,6 +85,7 @@ forever.load();
forever.stat = function (logFile, script, callback) {
var logAppend,
realCallback = callback;

if (arguments.length === 4) {
logAppend = callback;
realCallback = arguments[3];
Expand Down Expand Up @@ -427,7 +428,7 @@ forever.pidFilePath = function(pidFile) {
if (pidFile && pidFile[0] === "/") {
return pidFile;
} else {
return path.join(config.pidPath, pidFile);
return path.join(forever.config.pidPath, pidFile);
}
};

Expand Down

0 comments on commit be6de72

Please sign in to comment.