-
Pages
-
Categories
-
Archives
- August 2011
- May 2011
- April 2011
- August 2010
- April 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
- August 2006
- July 2006
- June 2006
- April 2006
- March 2006
Life as it is in Brockport, NY
FreeDNS, Synology NAS and crontab, Awesome!
I’ve just changed my domain dns service to FreeDNS and with the help of a little bash script, it will update from my Synology NAS which means I don’t have to have my box up all the time. This is great! I’ve setup cron to run it every 6 hour. For more information about cron you can check wikipedia.
#minute hour mday month wday who command
0 */6 * * * root /usr/bin/dnsactual.sh
Now that we have a cron working to run the script every 6 hours, let’s write the script. I’ve modified a bash script from FreeDNS that updates the dynamic ip if need be. Here is the code.
##############################################################################
# application name: dnsactual
# other files: dnsactual.conf (keeps the last updated ip)
# dnsactual.log (register date & time of the actualization)
# Author: Ernest Danton
# Date: 01/29/2007
# Modified by Benoit Beauchamp on 8/8/2010
##############################################################################
if test -f /etc/freedns/dnsactual.conf
then
CacheIP=$(cat /etc/freedns/dnsactual.conf)
fi
#echo $CacheIP
/opt/bin/wget http://freedns.afraid.org/dynamic/check.php -o /dev/null -O /tmp/ip
CurreIP=$(cat /tmp/ip | grep Detected | cut -d : -f 2 | cut -d '<' -f 1 | tr -d " ")
#echo $CurreIP
if [ "$CurreIP" = "$CacheIP" ]
then
# Both IP are equal
echo "Update not required..."
else
# The IP has change
echo "Updating http://free.afraid.org with " $CurreIP
wget http://freedns.afraid.org/dynamic/update.php?CHANGEMETOTHEPROPERKEY -o /dev/null -O /dev/stdout
echo `date` "Updating log with IP " $CurreIP >> dnsactual.log
fi
rm -f /etc/freedns/dnsactual.conf
echo $CurreIP > /etc/freedns/dnsactual.conf
You’ll have to change it according to your setting but the first thing that you will need to do in order to have it run properly is to make sure you have wget install. You can locate wget with the following command
> find / -name "wget"
/usr/syno/bin/wget
/opt/bin/wget
I used the opt/bin/wget in the script. You will also need to change the CHANGEME to your key that you can find on FreeDNS website located at http://freedns.afraid.org/dynamic/ under the Direct URL link.
So now that we have cron and a script installed. I can now connect to my subdomain of my choice from anywhere. It’s good to be able to call home without too much fuss. Easy isn’t it?
A Foggy Day In Charlottesville
A Quick Fix for the Garmin Nuvi 350
After updating my garmin to the latest software/firmware, the Nuvi 350 couldn’t acquire any satellites signals. I googled and found a trick. Here are the steps that I took.
1- Start by powering off the unit
2- Make sure the antenna is in the open position
3- Press the bottom left screen while holding the power button to turn the unit on
4- When ask if you are sure to enter Maintenance mode, say Yes
5- Select diagnostics
6- On the diagnostics page, select the reset button, clear error report
7- Restart the unit
While I was still in maintenance mode, browsing for the options, it found a fix to the satellites. There you go, now that I know about the maintenance mode, I hope that searching for the satellites will finally get easier and faster. Might be dreaming but we never know…
Make Video about LEDs
MAKE presents: The LED from make magazine on Vimeo.
A cool, well produced and short video about a bit of the history of LEDs created by Make. It’s worth your time!
Books I Received, Hacking in Progress
Here is what I have received and which I plan on playing around with. I got 3 books that I’m really happy about. I received Getting Started with Arduino, Physical Computing: Sensing and Controlling the Physical World with Computers, and Making Things Talk: Practical Methods for Connecting Physical Objects.
I can’t wait to read them and to start hacking away. I have no experience in doing this kinda of stuff. I really hope they will help as I want to learn more about movement vs computer, how to make things talk to each other basically. Hopefully I’ll be able to post more updates along the way.
Viral Marketing at the Death Star Germany
Enough of this mumbo jumbo, this is just too funny!


















