Problem Statement: All my files are stored in a server that runs ZFS, the problem is most of my development is done at my laptop. A lazy guy I am, I find the need to turn on both machines a bit boring and time-consuming. I spent a weekend to investigate how I could remotely turn on/off the machine from my laptop, and this project is the result of my investigation.
Terminology:
- 'server' refers to the machine of which you want to remotely administrate
- 'client' refers to the device from which you will administrate the server
Assumptions:
- Both of your server and client has a running copy of python. My version is 2.6.6, but all recent versions should be fine.
- Your server motherboard supports wake-on-LAN and this feature is enabled.
- My laptop is a mac while the server is running FreeBSD 8.2. However the instructions and scripts will be able to run on most *nix or even Windows machines with minimal modifications.
Steps:
- Clone the github project and you shall get 2 folders:
clientandserver - Follow the instructions in the
clientandserverfolders
- The scripts are assuming python is at /usr/local/bin. This is true for my machine, please verify its location at your end.
- The wake-on-lan only works when the system is in soft-shutdown. In other words, if your system had a cold shutdown (i.e. power supply off), it won`t be able to wake up from network activity.