2014-12-24 22:51:17 +01:00
|
|
|
node-red-node-daemon
|
|
|
|
====================
|
|
|
|
|
2015-09-02 11:56:32 +02:00
|
|
|
A <a href="http://nodered.org" target="_new">Node-RED</a> node that runs and
|
|
|
|
monitors a long running system command.
|
2014-12-24 22:51:17 +01:00
|
|
|
|
2015-09-02 11:56:32 +02:00
|
|
|
Similar to the **exec** node - but this calls the command at start time and
|
|
|
|
then pipes any input to the node to the STDIN of the running command, and feeds
|
|
|
|
any STDOUT to the first output.
|
2014-12-24 22:51:17 +01:00
|
|
|
|
|
|
|
Useful for monitoring command line based processes.
|
|
|
|
|
|
|
|
Install
|
|
|
|
-------
|
|
|
|
|
2016-03-02 14:24:56 +01:00
|
|
|
Run the following command in your Node-RED user directory - typically `~/.node-red`
|
2014-12-24 22:51:17 +01:00
|
|
|
|
2016-03-02 14:24:56 +01:00
|
|
|
npm i node-red-node-daemon
|
2014-12-24 22:51:17 +01:00
|
|
|
|
|
|
|
|
|
|
|
Usage
|
|
|
|
-----
|
|
|
|
|
2016-03-02 14:24:56 +01:00
|
|
|
Calls out to a long running system command. Sends `msg.payload` to stdin of the process.
|
2014-12-24 22:51:17 +01:00
|
|
|
|
2015-09-02 11:56:32 +02:00
|
|
|
**Note** Only the command itself should be placed in the command field.
|
|
|
|
All parameters **must** be placed in the arguments field.
|
2014-12-24 22:51:17 +01:00
|
|
|
|
2015-09-02 11:56:32 +02:00
|
|
|
The command provides 3 outputs... stdout, stderr, and return code, from the running command.
|
2014-12-24 22:51:17 +01:00
|
|
|
|
2015-09-02 11:56:32 +02:00
|
|
|
If the called program stops (i.e. a return code is produced), this node can attempt
|
|
|
|
to restart the command automatically.
|
2014-12-24 22:51:17 +01:00
|
|
|
|
2015-09-02 11:56:32 +02:00
|
|
|
**Note :** when you stop Node-RED running we may not get a chance to kill the
|
|
|
|
called program so it may remain running. You <i>may</i> have to kill it manually.
|
|
|
|
|
|
|
|
For example it can be used to run and then monitor the
|
|
|
|
<a href="https://github.com/antirez/dump1090" target="_new">dump1090</a> plane
|
|
|
|
spotter, and also to interact with various python apps that everyone seem to write
|
|
|
|
these days :-)
|