From c89c3fc2fac1f2203f76167468410f6b5e829050 Mon Sep 17 00:00:00 2001 From: kaiyou Date: Thu, 22 Aug 2019 22:44:49 +0200 Subject: [PATCH] Remove unnecessary host variable assignments (cherry picked from commit 4afbc09d6ecb40b313542db959e2a7175d32a2d7) # Conflicts: # core/nginx/config.py --- core/nginx/config.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/core/nginx/config.py b/core/nginx/config.py index 96812dba..b4f61994 100755 --- a/core/nginx/config.py +++ b/core/nginx/config.py @@ -67,8 +67,19 @@ args['TLS_PERMISSIVE'] = str(args.get('TLS_PERMISSIVE')).lower() not in ('false' # Get the first DNS server with open("/etc/resolv.conf") as handle: content = handle.read().split() +<<<<<<< HEAD resolver = content[content.index("nameserver") + 1] args["RESOLVER"] = f"[{resolver}]" if ":" in resolver else resolver +======= + args["RESOLVER"] = content[content.index("nameserver") + 1] + +args["ADMIN_ADDRESS"] = system.resolve_address(args.get("HOST_ADMIN", "admin")) +args["ANTISPAM_ADDRESS"] = system.resolve_address(args.get("HOST_ANTISPAM", "antispam:11334")) +if args["WEBMAIL"] != "none": + args["WEBMAIL_ADDRESS"] = system.resolve_address(args.get("HOST_WEBMAIL", "webmail")) +if args["WEBDAV"] != "none": + args["WEBDAV_ADDRESS"] = system.resolve_address(args.get("HOST_WEBDAV", "webdav:5232")) +>>>>>>> 4afbc09d (Remove unnecessary host variable assignments) # TLS configuration cert_name = args.get("TLS_CERT_FILENAME", "cert.pem")