Coder Social home page Coder Social logo

zonereload's Introduction

zonereload

Reloads a bind dns zone without the need to restart the named/bind9 service.

Description:

Assuming the zone to update is called “THEZONE” perform the following:

    vim /var/data/named/data/zones/THEZONE.zone;

Update the zone in vim and save it. Then you would need to:

    rndc freeze THEZONE
    rndc reload THEZONE
    rndc thaw THEZONE

Other sysAdmins/devOps/partners would just use:

    service named restart

Doing so will clear its cache (if used as a local DNS resolver) and cause a small outage if clients do not have their current domain lookup cached.

So… the moral of the story is to freeze, reload and thaw. But for uniformize and standardize the reload method through the entire team i developed this script that also sends and email alerts.

Installation: Upload the script to the server to /bin/zonereload

    chown root root /bin/zonereload
    chmod 744 /bin/zonereload

Mail configuration: The email alerts needs a valid email-address, to configure it edit /bin/zonereload and modify the mail_account parameter at the very top of the file:

   mail_account="[email protected]"

Save it and you are ready to use it!

Usage:

    zonereload -z <zone>

Options:

  • "-h" to show the help.
  • "-s" to avoid email notification.
  • "-z " to specify the zone.

zonereload's People

Contributors

facundovictor avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.