From a89379c631bbb70886e417be2166b5332dc2c21d Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Thu, 8 Feb 2018 15:44:38 +0000 Subject: [PATCH] add android platform to ping node to close #402 by hand --- io/ping/88-ping.js | 2 +- io/ping/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/io/ping/88-ping.js b/io/ping/88-ping.js index 84fb577e..71b250dd 100644 --- a/io/ping/88-ping.js +++ b/io/ping/88-ping.js @@ -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."); } diff --git a/io/ping/package.json b/io/ping/package.json index 6d4ccf1f..4ea4be27 100644 --- a/io/ping/package.json +++ b/io/ping/package.json @@ -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" : { },