Skip to content

Instantly share code, notes, and snippets.

@donpinkster
Created May 19, 2010 12:00
Show Gist options
  • Save donpinkster/406228 to your computer and use it in GitHub Desktop.
Save donpinkster/406228 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
zones_directory = "/var/named/slaves/*.hosts"
domains = Dir.glob(zones_directory).collect { |file| File.basename(file).sub(".hosts", "") }
domains.each do |domain|
print `rndc retransfer #{domain}`
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment