Skip to content

Nodejs module for Parse and Generate zoneFile of Bind DNS. Manager system

License

Notifications You must be signed in to change notification settings

ahmadyazdanii/bind-zone-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bind-zone-manager

npm version

Nodejs module for Parse and Generate zoneFile of Bind DNS. Manager system

Installation

Use the npm for install

npm install bind-zone-manager --save

Support

The module developed for Bind9 system and support basic zone files options.

Usage

/*
   import module
*/
const ZoneManager = require('bind-zone-manager') 

/* 
   generate new manager without zone File path if you want work
   with zoneFile follow `new ZoneManager(<ZoneFilePath>)` 
*/
const manager = new ZoneManager() 

/*
   Parse raw data, if you used <ZoneFilePath> for generate manager
   You do not need to define {RawData} in Parse function
*/
var parsedData = manager.Parse({RawData}) 

/*
   generate {custom-list} to string and you can write it to zone
   file or anything you want to do with it
*/
var generatedData = manager.Generate({custom-list})
{RawData}
zone "test.com" {
   type master;
   file "record-db-file-path";
};

zone "test2.com" {
   type master;
   file "record-db-file-path";
};
{custom-list}
[
   { 
     Host:"test.com",
     Type:"master",
     DbFilePath:"record-db-file-path"
   },
   { 
     Host:"test2.com",
     Type:"master",
     DbFilePath:"record-db-file-path"
   }
]

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

About

Nodejs module for Parse and Generate zoneFile of Bind DNS. Manager system

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published