Skip to content

Commit

Permalink
Renaming stoppid -> stopbypid
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonyAkentiev authored and indexzero committed Nov 4, 2014
1 parent 4adf834 commit 1d863ba
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ You can use forever to run any kind of script continuously (whether it is writte
start Start SCRIPT as a daemon
stop Stop the daemon SCRIPT
stopall Stop all running forever scripts
stoppid Stop running forever script by pid
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
4 changes: 2 additions & 2 deletions lib/forever.js
Original file line number Diff line number Diff line change
Expand Up @@ -573,12 +573,12 @@ forever.restart = function (target, format) {
};

//
// ### function stoppid (target, format)
// ### function stopbypid (target, format)
// #### @pid {string} Pid of process to stop.
// #### @format {boolean} Indicated if we should CLI format the returned output.
// Stops the process with specified pid
//
forever.stoppid = function (pid, format) {
forever.stopbypid = function (pid, format) {
// stopByPid only capable of stopping, but can't restart
return stopByPid('stop', format, pid);
};
Expand Down
10 changes: 5 additions & 5 deletions lib/forever/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var help = [
' start Start SCRIPT as a daemon',
' stop Stop the daemon SCRIPT',
' stopall Stop all running forever scripts',
' stoppid Stop running forever script by pid',
' 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 @@ -88,7 +88,7 @@ var app = flatiron.app;
var actions = [
'start',
'stop',
'stoppid',
'stopbypid',
'stopall',
'restart',
'restartall',
Expand Down Expand Up @@ -290,11 +290,11 @@ app.cmd(/stop (.+)/, cli.stop = function (file) {
});

//
// ### function stoppid (pid)
// ### function stopbypid (pid)
// Stops running forever process by pid.
//
app.cmd(/stoppid (.+)/, cli.stoppid = function (pid) {
var runner = forever.stoppid(pid, true);
app.cmd(/stopbypid (.+)/, cli.stopbypid = function (pid) {
var runner = forever.stopbypid(pid, true);

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

0 comments on commit 1d863ba

Please sign in to comment.