1.0.0 • Published 5 years ago
bind-zone-manager v1.0.0
bind-zone-manager
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
1.0.0
5 years ago