]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
startup.py: stop using tabs
authorPieter Lexis <pieter.lexis@powerdns.com>
Mon, 9 Nov 2020 16:35:25 +0000 (17:35 +0100)
committerPieter Lexis <pieter.lexis@powerdns.com>
Mon, 9 Nov 2020 16:35:25 +0000 (17:35 +0100)
dockerdata/startup.py

index 8f21433aaccfc5f2aa1546de6e98683af1b3eb9f..47685b3879ea989872be21f966be50bd81459655 100755 (executable)
@@ -11,40 +11,40 @@ apiconftemplate = None
 args = []
 
 if product == 'pdns_recursor':
-       args = ['--disable-syslog']
-       apiconffile = '/etc/powerdns-api.conf'
-       apienvvar = 'PDNS_RECURSOR_API_KEY'
-       apiconftemplate = """webserver
+    args = ['--disable-syslog']
+    apiconffile = '/etc/powerdns-api.conf'
+    apienvvar = 'PDNS_RECURSOR_API_KEY'
+    apiconftemplate = """webserver
 api-key={apikey}
 webserver-address=0.0.0.0
 webserver-allow-from=0.0.0.0/0
 webserver-password={apikey}
-"""
+    """
 elif product == 'pdns_server':
-       args = ['--disable-syslog']
-       apiconffile = '/etc/powerdns-api.conf'
-       apienvvar = 'PDNS_AUTH_API_KEY'
-       apiconftemplate = """webserver
+    args = ['--disable-syslog']
+    apiconffile = '/etc/powerdns-api.conf'
+    apienvvar = 'PDNS_AUTH_API_KEY'
+    apiconftemplate = """webserver
 api
 api-key={apikey}
 webserver-address=0.0.0.0
 webserver-allow-from=0.0.0.0/0
 webserver-password={apikey}
-"""
+    """
 elif product == 'dnsdist':
-       args = ['--supervised', '--disable-syslog']
-       apiconffile = '/etc/dnsdist-api.conf'
-       apienvvar = 'DNSDIST_API_KEY'
-       apiconftemplate = """webserver("0.0.0.0:8083", '{apikey}', '{apikey}', {{}}, '0.0.0.0/0')
+    args = ['--supervised', '--disable-syslog']
+    apiconffile = '/etc/dnsdist-api.conf'
+    apienvvar = 'DNSDIST_API_KEY'
+    apiconftemplate = """webserver("0.0.0.0:8083", '{apikey}', '{apikey}', {{}}, '0.0.0.0/0')
 controlSocket('0.0.0.0:5199')
 setKey('{apikey}')
 setConsoleACL('0.0.0.0/0')
-"""
+    """
 
 apikey = os.getenv(apienvvar)
 print("apikey=", apikey)
 if apikey is not None:
-       with open(apiconffile, 'w') as conf:
-               conf.write(apiconftemplate.format(apikey=apikey))
+    with open(apiconffile, 'w') as conf:
+        conf.write(apiconftemplate.format(apikey=apikey))
 
 os.execv(program, [program]+args+sys.argv[1:])