remove extra debug, make start only start and change doc to match

This commit is contained in:
gmarzot 2023-07-20 17:37:53 -04:00
parent a06b728c8a
commit ff6af40097
2 changed files with 2 additions and 6 deletions

View File

@ -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`.

View File

@ -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)) {