Posts tagged WOL

Wake-On-Lan Shell Script for Tomato

I needed a way to wake up my server when I was away. And since I run DD-WRT, I Wrote a WOL Script for it. You can read more about it here

Some people emailed me or asked via the comments section if I would create a version for Tomato, which is another popular firmware for routers

Now that I upgraded my main router to a Bufallo WZR-HP-AG300H, I had my old and trusty Buffalo WHR-G54S to play with, so I loaded Tomato on it, and decided to modify my WOL scrit for it.

Enjoy!

 

Once you get the script into your router (copy and paste into VI or WinSCP), to use it, all you have to do is type “./wol.sh <servername> and the script will handle the rest

Don’t forget to “chmod +x” the script first

This script dumps out the “dhcpd_static” nvram variable into “/tmp/static.hosts”, so if you have a DHCP reservation for your server like I do, it should be included in this file as a “static” ip adress, along with the MAC address, which is what you really need for WOL to work

Facebook Twitter Email Linkedin Digg Delicious

Wake-On-Lan Shell Script for DD-WRT [Updated 08/2012]

I needed a way to wake up my server when I was away.  I don’t like to keep it running all day, so Wake-On-Lan was the solution for me.  I run DD-WRT as the Firmware on my router, so I knew that I could write some kind of script for it to do that for me.  Since DD-WRT already includes a Wake-On-Lan binary, I searched the DD-WRT site, and found a script that is supposed to do WOL, but it didnt really work, so I borrowed the Idea, and created my own:

Update [08/2012]:
DD-WRT now requires you to add “#!/bin/sh” to the beginning of every script, so I updated the Script Accordingly!!

Once you get the script into your router, to use it, all you have to do is type “./wol.sh <servername> and the script will handle the rest

This script looks at your dnsmasq.conf file, so if you have a DHCP reservation for your server like I do, it should be included in this file as a “static” ip adress, along with the MAC address, which is what you really need for WOL to work

Facebook Twitter Email Linkedin Digg Delicious
Go to Top