bump wake on lan package

This commit is contained in:
Dave Conway-Jones
2018-09-13 12:00:53 -04:00
parent 8d77028b4a
commit a5f29e3445
2 changed files with 11 additions and 3 deletions

View File

@@ -17,9 +17,13 @@ module.exports = function(RED) {
if (chk.test(mac)) {
try {
wol.wake(mac, {address: host}, function(error) {
if (error) { node.warn(error); }
if (error) {
node.warn(error);
node.status({fill:"red",shape:"ring",text:" "});
}
else if (RED.settings.verbose) {
node.log("sent WOL magic packet");
node.status({fill:"green",shape:"dot",text:" "});
}
});
}
@@ -31,6 +35,10 @@ module.exports = function(RED) {
}
else { node.warn("WOL: no mac address specified"); }
});
this.on("close", function () {
node.status({});
})
}
RED.nodes.registerType("wake on lan",WOLnode);
}