diff --git a/README.md b/README.md index 38f85772..b593951f 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/lib/forever.js b/lib/forever.js index 7f9256a7..b451e59f 100644 --- a/lib/forever.js +++ b/lib/forever.js @@ -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); }; diff --git a/lib/forever/cli.js b/lib/forever/cli.js index c3486990..79dd9b3c 100644 --- a/lib/forever/cli.js +++ b/lib/forever/cli.js @@ -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', @@ -88,7 +88,7 @@ var app = flatiron.app; var actions = [ 'start', 'stop', - 'stoppid', + 'stopbypid', 'stopall', 'restart', 'restartall', @@ -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:');