This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Remote shutdown a PC from visualization
#3
(04.07.2017, 06:05)admin Wrote: You can install Lua + Luasocket on Linux and create a simple script which receives UDP messages on a certain port. Then just do os.execute('poweroff') (or 'sudo poweroff' if not running a root) when a certain message is received.
Code:
sock = require('socket').udp()
sock:setsockname('*', 12345)
sock:settimeout(1)

while true do
 msg = sock:receive()
 if msg and msg == 'shutdown' then
   os.execute('poweroff')
 end
end

Then you can shutdown from LM like this:
Code:
sock = require('socket').udp()
sock:sendto('shutdown', '192.168.1.11', 12345)

Thank you for the reply but I was asking how to poweroff some windows machines from LM which is linux based...
Reply


Messages In This Thread
RE: Remote shutdown a PC from visualization - by jetsetter - 04.07.2017, 14:22

Forum Jump: