Skip to content

Commit

Permalink
[pull-request] #244, from @michaelcdillon
Browse files Browse the repository at this point in the history
  • Loading branch information
bmeck authored and AvianFlu committed Apr 19, 2012
1 parent ea5317c commit 1ad16b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/initd-example
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ start() {

# Launch the application
start_daemon
$forever start -p $forever_dir --pidfile $pidfile -l $logfile -a -d $INSTANCE_DIR $SOURCE_NAME
$forever start -p $forever_dir --pidFile $pidfile -l $logfile -a -d $INSTANCE_DIR $SOURCE_NAME
RETVAL=$?
else
echo "Instance already running"
Expand Down Expand Up @@ -70,7 +70,7 @@ stop() {

getForeverId() {
local pid=$(pidofproc -p $pidfile)
$forever list -p $forever_dir | $sed -e 's/\x1b\[[0-9; ]*m//g' | $awk "\$4 == \"$pid]\" { gsub(/[\[\]]/, \"\", \$1); print \$1; }"
$forever list -p $forever_dir | $sed -e 's/\x1b\[[0-9; ]*m//g' | $awk "\$6 && \$6 == \"$pid\" { gsub(/[\[\]]/, \"\", \$2); print \$2; }";
}
id=$(getForeverId)

Expand Down
2 changes: 1 addition & 1 deletion lib/forever/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ var getOptions = cli.getOptions = function (file) {
options[key] = app.config.get(key);
});

options.sourceDir = file && file[0] !== '/' ? process.cwd() : '/';
options.sourceDir = options.sourceDir || (file && file[0] !== '/' ? process.cwd() : '/');
if (options.sourceDir) {
options.spawnWith = {cwd: options.sourceDir};
}
Expand Down

0 comments on commit 1ad16b0

Please sign in to comment.