Browse Source

fixed init.py to add zones as master instead of native

tags/v2.0.0
Robin Thoni 7 years ago
parent
commit
90786bec7b
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      init.py

+ 5
- 1
init.py View File

19
     out = container.exec_run(['pdnsutil', 'create-zone', zone])
19
     out = container.exec_run(['pdnsutil', 'create-zone', zone])
20
     if out is not None:
20
     if out is not None:
21
         out = out.decode('UTF-8')
21
         out = out.decode('UTF-8')
22
-        return out == 'Creating empty zone \'%s\'\n' % (zone) # might to strict, but as we can not get return code
22
+        if out != 'Creating empty zone \'%s\'\n' % (zone): # might to strict, but as we can not get return code
23
+            return False
24
+        out = container.exec_run(['pdnsutil', 'set-kind', zone, 'master'])
25
+        out = out.decode('UTF-8')
26
+        return out == '';
23
     return False
27
     return False
24
 
28
 
25
 def get_tsig_keys(container):
29
 def get_tsig_keys(container):

Loading…
Cancel
Save