As I tweeted last week, DynDNS killed my account again but this time I was in California for 2 weeks, leaving me without access to my home network. That was less than convenient. So, on my to-do list for when I got home was trying to figure out a more robust solution. Turns out its pretty simple to do with DreamHost’s APIs and a cron job. Here’s my script:

current_dns=`curl "$KEY&cmd=dns-list_records" 2>/dev/null | grep "$HOST" | grep -Eo '([0-9]{1,3}\.){3}[0-9]{1,3}'`
current=`curl ""`
if test $current = $current_dns; then
    echo "their equal"
    echo `curl "$KEY&cmd=dns-remove_record&record=$HOST&type=A&value=$current_dns"`
    echo `curl "$KEY&cmd=dns-add_record&record=$HOST&type=A&value=$current"`

And the content of is:


Hopefully that helps out anyone else that’s facing the same frustration.