Commit 60517bdd authored by Andreas Kempe's avatar Andreas Kempe
Browse files

Convert to a CGI script.

parent c110895c
......@@ -2,7 +2,8 @@
from db import DB
from dnssec_keygen import dnssec_keygen
with DB() as d:
def application(env, start_response):
with DB() as d:
for id in d.get_domain_ids():
domain_name = d.get_domain_name(id)
for sid in d.get_subdomain_ids_without_keys(id):
......@@ -13,3 +14,6 @@ with DB() as d:
public_key, private_key = dk.create_keys(fqdn)
if not d.set_subdomain_keys(sid, public_key, private_key):
print('Could not save keys for {}!'.format(sid))
start_response('200 OK', [('Content-Type', 'text/html')])
return [b""]
Markdown is supported
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