Permalink
Browse files

[minor] Small updates after merging from kpdecker

  • Loading branch information...
indexzero committed Apr 19, 2011
1 parent 3beb6da commit be6de7274dd1c319bb524bce50f3b55a7d81845a
Showing with 16 additions and 15 deletions.
  1. +13 −13 bin/forever
  2. +3 −2 lib/forever.js
View
@@ -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]",
@@ -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.",
View
@@ -50,7 +50,7 @@ forever.load = function (options) {
return;
}
forever.config = config = options;
forever.config = config = options;
//
// Syncronously create the `root` directory
@@ -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];
@@ -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);
}
};

0 comments on commit be6de72

Please sign in to comment.