mirror of
https://github.com/node-red/node-red-nodes.git
synced 2025-03-01 10:37:43 +00:00
remove extra debug, make start only start and change doc to match
This commit is contained in:
parent
a06b728c8a
commit
ff6af40097
@ -34,7 +34,7 @@ to restart the command automatically.
|
||||
|
||||
Setting `msg.kill` to a signal name (e.g. SIGINT, SIGHUP) will stop the process - but if the restart flag is set it will then auto restart.
|
||||
|
||||
Sending `msg.start` will also re-start the process. Additional arguments can be specified in `msg.args`.
|
||||
Sending `msg.start` will start the process, if not already running. Additional arguments can be specified in `msg.args`.
|
||||
|
||||
Sending `msg.stop` will stop the process and prevent automatic re-start until reset with `msg.start`.
|
||||
|
||||
|
@ -38,7 +38,6 @@ module.exports = function(RED) {
|
||||
if (node.running) {
|
||||
node.child.kill(node.closer);
|
||||
}
|
||||
node.debug(node.cmd+" stopped by msg");
|
||||
node.status({fill:"grey",shape:"ring",text:RED._("daemon.status.stopped")});
|
||||
}
|
||||
else if (msg.hasOwnProperty("kill") && node.running) {
|
||||
@ -46,17 +45,14 @@ module.exports = function(RED) {
|
||||
node.child.kill(msg.kill.toUpperCase());
|
||||
}
|
||||
else if (msg.hasOwnProperty("start")) {
|
||||
node.stopped = false;
|
||||
if (!node.running) {
|
||||
let args = "";
|
||||
if (msg.hasOwnProperty("args") && msg.args.length > 0) {
|
||||
args = parseArgs(msg.args.trim());
|
||||
}
|
||||
runit(args);
|
||||
} else {
|
||||
node.child.kill(node.closer);
|
||||
// should this also re-start the process incase redo is not set XXX
|
||||
}
|
||||
node.stopped = false;
|
||||
}
|
||||
else {
|
||||
if (!Buffer.isBuffer(msg.payload)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user