Created
December 9, 2011 19:30
-
-
Save acf/1452931 to your computer and use it in GitHub Desktop.
s/old.ip/new.ip/g in a DNSimple account
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'dnsimple' | |
DNSimple::Client.username = 'randall@rstvideo.com' | |
DNSimple::Client.password = 'd34thst4r' | |
DNSimple::Client.debug = false | |
user = DNSimple::User.me | |
puts "#{user.domain_count} domains" | |
puts "Domains..." | |
DNSimple::Domain.all.each do |domain| | |
puts " #{domain.name}" | |
DNSimple::Record.all(domain).each do |record| | |
if record.content == "1.2.3.4" | |
puts "found type: #{record.record_type} name: #{record.name} content: #{record.content}" | |
record.content = "1.77.80.83" | |
record.save | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
"Uh, yeah, hi. This is RST Video calling. Customer number 4352, I'd like to place an order. Okay, I need one each of the following tapes..."