1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00

add android platform to ping node

to close #402 by hand
This commit is contained in:
Dave Conway-Jones 2018-02-08 15:44:38 +00:00
parent f9ac210a41
commit a89379c631
No known key found for this signature in database
GPG Key ID: 9E7F9C73F5168CD4
2 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ module.exports = function(RED) {
node.tout = setInterval(function() {
var ex;
if (plat == "linux") { ex = spawn('ping', ['-n', '-w', '5', '-c', '1', node.host]); }
if (plat == "linux" || plat == "android") { ex = spawn('ping', ['-n', '-w', '5', '-c', '1', node.host]); }
else if (plat.match(/^win/)) { ex = spawn('ping', ['-n', '1', '-w', '5000', node.host]); }
else if (plat == "darwin" || plat == "freebsd") { ex = spawn('ping', ['-n', '-t', '5', '-c', '1', node.host]); }
else { node.error("Sorry - your platform - "+plat+" - is not recognised."); }

View File

@ -1,6 +1,6 @@
{
"name" : "node-red-node-ping",
"version" : "0.0.14",
"version" : "0.0.15",
"description" : "A Node-RED node to ping a remote server, for use as a keep-alive check.",
"dependencies" : {
},