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.
This commit is contained in:
Bastian (BaM)
2025-09-15 08:49:30 +02:00
parent 8cb6d55782
commit e6dea9fc3f

View File

@@ -91,10 +91,10 @@ function network.send_wol(mac_str, bcast_ip, port)
-- Fallback to external tool if socket is not available -- Fallback to external tool if socket is not available
if not network.is_socket_available() then if not network.is_socket_available() then
utils.log("Socket module not available, using external wakeonlan tool") utils.log("Socket module not available, using external wol tool")
local cmd = string.format("wakeonlan -i %s -p %d %s", bcast_ip, port, mac_str) local cmd = string.format("wol -i %s -p %d %s", bcast_ip, port, mac_str)
local result = os.execute(cmd) 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 end
-- Create IPv4 UDP socket (udp4 if available), bind to IPv4 wildcard to lock AF_INET -- Create IPv4 UDP socket (udp4 if available), bind to IPv4 wildcard to lock AF_INET