updated bind-restful for python3
This commit is contained in:
parent
c1495cf800
commit
2ee48c71e1
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
*.pyc
|
||||
*.ini
|
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import ConfigParser
|
||||
import configparser
|
||||
import dns.tsigkeyring
|
||||
import dns.resolver
|
||||
import dns.update
|
||||
@ -20,7 +20,7 @@ def parse_config(config):
|
||||
password required to perform dynamic DNS updates
|
||||
"""
|
||||
options = {}
|
||||
parser = ConfigParser.ConfigParser()
|
||||
parser = configparser.ConfigParser()
|
||||
parser.read(config)
|
||||
|
||||
options['nameserver'] = parser.get('nameserver', 'server')
|
||||
@ -151,4 +151,4 @@ def dns_mgmt(domain, ttl, record_type, response):
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(debug=True)
|
||||
app.run(host='0.0.0.0',port=5001,debug=True)
|
||||
|
@ -1,9 +0,0 @@
|
||||
[nameserver]
|
||||
server = 172.16.33.135
|
||||
|
||||
[auth]
|
||||
username = TRANSFER
|
||||
password = /h9xIk0tbF3A0lOzy6BYAQ==
|
||||
|
||||
[zones]
|
||||
valid = ops.internal.net,eng.internal.net
|
9
config.ini.sample
Normal file
9
config.ini.sample
Normal file
@ -0,0 +1,9 @@
|
||||
[nameserver]
|
||||
server = 127.0.0.1
|
||||
|
||||
[auth]
|
||||
username = example.com.
|
||||
password = hS7nabA8gHDEiGmZD+tyCDWYtcY8D3rH6pPlzbIrYGv6KJ7JF+b14sDjqrpriIqOlJhY7P0lBec8DsjOzuQNaw==
|
||||
|
||||
[zones]
|
||||
valid = example.com
|
Loading…
Reference in New Issue
Block a user