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:
		@@ -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.
 | 
					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`.
 | 
					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) {
 | 
					                    if (node.running) {
 | 
				
			||||||
                        node.child.kill(node.closer);
 | 
					                        node.child.kill(node.closer);
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                    node.debug(node.cmd+" stopped by msg");
 | 
					 | 
				
			||||||
                    node.status({fill:"grey",shape:"ring",text:RED._("daemon.status.stopped")});
 | 
					                    node.status({fill:"grey",shape:"ring",text:RED._("daemon.status.stopped")});
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                else if (msg.hasOwnProperty("kill") && node.running) {
 | 
					                else if (msg.hasOwnProperty("kill") && node.running) {
 | 
				
			||||||
@@ -46,17 +45,14 @@ module.exports = function(RED) {
 | 
				
			|||||||
                    node.child.kill(msg.kill.toUpperCase());
 | 
					                    node.child.kill(msg.kill.toUpperCase());
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                else if (msg.hasOwnProperty("start")) {
 | 
					                else if (msg.hasOwnProperty("start")) {
 | 
				
			||||||
                    node.stopped = false;
 | 
					 | 
				
			||||||
                    if (!node.running) {
 | 
					                    if (!node.running) {
 | 
				
			||||||
                        let args = "";
 | 
					                        let args = "";
 | 
				
			||||||
                        if (msg.hasOwnProperty("args") && msg.args.length > 0) {
 | 
					                        if (msg.hasOwnProperty("args") && msg.args.length > 0) {
 | 
				
			||||||
                            args = parseArgs(msg.args.trim());
 | 
					                            args = parseArgs(msg.args.trim());
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
                        runit(args);
 | 
					                        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 {
 | 
					                else {
 | 
				
			||||||
                    if (!Buffer.isBuffer(msg.payload)) {
 | 
					                    if (!Buffer.isBuffer(msg.payload)) {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user