Commit 61c77751 authored by Andreas Kempe's avatar Andreas Kempe
Browse files

Convert to a CGI application.

parent f9c5f7d7
......@@ -57,7 +57,7 @@ def lookup(fully_qualified_domain_name):
return ips
if __name__ == '__main__':
def application(env, start_response):
env = Environment(loader = FileSystemLoader('.'))
# Keys
......@@ -126,3 +126,6 @@ if __name__ == '__main__':
recordlist = zonefile.recordlist)
with open("/usr/local/etc/namedb/master/" + domain_name, "w") as zonefile_file:
start_response('200 OK', [('Content-Type', 'text/html')])
return [b""]
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment