-
Notifications
You must be signed in to change notification settings - Fork 24
MODS ACPI On Lan
This is packaging of a web application I have made to list all devices on my LAN and wake up, shutdown, restart or set them in sleep or standby mode.
Find the source code here
Shutdown, restart, sleep and standby mode are only supported by Windows and require a service to be installed.
ACPI On Lan is looking first for Local Synology Ethernet connections: ovs_bond0, ovs_bond1, ovs_eth0, ovs_eth1, eth1, eth2, eth3 or eth4. For each Ethernet connections found, ACPI On Lan fetches the MAC address, the IP and the IP Mask using 'ifconfig'.
Next, looking into the Arp table, ACPI On Lan list all known devices, retrieve the MAC address and the latest known IP.
For each device, if a hostname cannot be found using 'nmblookup', ACPI On Lan will try to get the Vendor name using the service https://api.macvendors.com. For that, during the installation of the package, you must configure a free token obtained on https://app.macvendors.com.
To "Wake Up" a device, ACPI On Lan sends a "Magic Packet" created as explained here.
Php 7.3 must be installed.
The "ping" command is used by this package. As it is running under the "http" account, its Setuid will be activated during the setup (chmaod +s).