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

Add freebsd as a valid platform (#274)

Freebsd ping command equals darwins ping command
This commit is contained in:
Julian Hille 2017-02-06 23:13:19 +01:00 committed by Dave Conway-Jones
parent fa781d6e1a
commit 0ad4a7bc4d

View File

@ -14,7 +14,7 @@ module.exports = function(RED) {
var ex; var ex;
if (plat == "linux") { ex = spawn('ping', ['-n', '-w', '5', '-c', '1', node.host]); } if (plat == "linux") { 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.match(/^win/)) { ex = spawn('ping', ['-n', '1', '-w', '5000', node.host]); }
else if (plat == "darwin") { ex = spawn('ping', ['-n', '-t', '5', '-c', '1', 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."); } else { node.error("Sorry - your platform - "+plat+" - is not recognised."); }
var res = false; var res = false;
var line = ""; var line = "";