Skip to content

Commit

Permalink
forever stopbypid is deprecated now, using forever stop <pid> ins…
Browse files Browse the repository at this point in the history
…tead.
  • Loading branch information
Tjatse committed Nov 9, 2014
1 parent d506771 commit 2c394ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ You can use forever to run any kind of script continuously (whether it is writte
actions:
start Start SCRIPT as a daemon
stop Stop the daemon SCRIPT
stop Stop the daemon SCRIPT by Id|Uid|Pid|Index|Script
stopall Stop all running forever scripts
stopbypid Stop running forever script by pid
restart Restart the daemon SCRIPT
restartall Restart all running forever scripts
list List all running forever scripts
Expand Down
16 changes: 3 additions & 13 deletions lib/forever/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ var help = [
'',
'actions:',
' start Start SCRIPT as a daemon',
' stop Stop the daemon SCRIPT',
' stop Stop the daemon SCRIPT by Id|Uid|Pid|Index|Script',
' stopall Stop all running forever scripts',
' stopbypid Stop running forever script by pid',
' restart Restart the daemon SCRIPT',
' restartall Restart all running forever scripts',
' list List all running forever scripts',
Expand Down Expand Up @@ -294,17 +293,8 @@ app.cmd(/stop (.+)/, cli.stop = function (file) {
// Stops running forever process by pid.
//
app.cmd(/stopbypid (.+)/, cli.stopbypid = function (pid) {
var runner = forever.stopbypid(pid, true);

runner.on('stop', function (process) {
forever.log.info('Forever stopped process:');
forever.log.data(process);
});

runner.on('error', function (err) {
forever.log.error('Forever cannot find process with pid: ' + pid);
process.exit(1);
});
forever.log.warn('Deprecated, try `forever stop ' + pid + '` instead.');
cli.stop(pid);
});

//
Expand Down

0 comments on commit 2c394ab

Please sign in to comment.