diff --git a/utility/daemon/daemon.js b/utility/daemon/daemon.js index d29ccac8..d2eb6cbc 100644 --- a/utility/daemon/daemon.js +++ b/utility/daemon/daemon.js @@ -36,6 +36,10 @@ module.exports = function(RED) { } function runit() { + if (!node.cmd || (typeof node.cmd !== "string") || (node.cmd.length < 1)) { + node.status({fill:"grey",shape:"ring",text:"no command"}); + return; + } node.child = spawn(node.cmd, node.args); if (RED.settings.verbose) { node.log(node.cmd+" "+JSON.stringify(node.args)); } node.status({fill:"green",shape:"dot",text:"running"}); diff --git a/utility/daemon/package.json b/utility/daemon/package.json index e6f78219..694284d2 100644 --- a/utility/daemon/package.json +++ b/utility/daemon/package.json @@ -1,6 +1,6 @@ { "name" : "node-red-node-daemon", - "version" : "0.0.14", + "version" : "0.0.15", "description" : "A Node-RED node that runs and monitors a long running system command.", "dependencies" : { },