Script to Wakeup machine over LAN


If you want to wakeup remote machine over a LAN and automatically start the remote desktop viewer this is a solution.

The script first send a magic package to wakeup the remote machine. After that is checking every 4 second is the remote desktop is available on the machine. This done by telnet-ting to port 5900.