Skip to content

Remotely turns on/off a server by using Wake-on-LAN and a daemon

Notifications You must be signed in to change notification settings

hkchai/Remote_Switch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

Remote Server Wake-up and Shutdown

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:

  1. Clone the github project and you shall get 2 folders: client and server
  2. Follow the instructions in the client and server folders

IMPORTANT:

  1. The scripts are assuming python is at /usr/local/bin. This is true for my machine, please verify its location at your end.
  2. 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.

About

Remotely turns on/off a server by using Wake-on-LAN and a daemon

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages