Browse Source

Update external tool command for Wake-on-LAN functionality

Change the command from 'wakeonlan' to 'wol' in the network module for better compatibility. Update log messages to reflect the new tool being used.
main
Bastian (BaM) 3 months ago
parent
commit
e6dea9fc3f
  1. 6
      scripts/network.lua

6
scripts/network.lua

@ -91,10 +91,10 @@ function network.send_wol(mac_str, bcast_ip, port)
-- Fallback to external tool if socket is not available
if not network.is_socket_available() then
utils.log("Socket module not available, using external wakeonlan tool")
local cmd = string.format("wakeonlan -i %s -p %d %s", bcast_ip, port, mac_str)
utils.log("Socket module not available, using external wol tool")
local cmd = string.format("wol -i %s -p %d %s", bcast_ip, port, mac_str)
local result = os.execute(cmd)
return result == 0, result ~= 0 and "wakeonlan command failed" or nil
return result == 0, result ~= 0 and "wol command failed" or nil
end
-- Create IPv4 UDP socket (udp4 if available), bind to IPv4 wildcard to lock AF_INET

Loading…
Cancel
Save