1
0
Fork 0

Multiple Hosts

This commit is contained in:
Joao M 2022-08-15 20:20:18 +00:00
parent c62db6e573
commit d0f91c6718
6 changed files with 144 additions and 38 deletions

View file

@ -2,7 +2,7 @@ import os
from easymapping import HaproxyConfigGenerator
with open("/tmp/.docker_data", 'r') as content_file:
lineList = content_file.readlines()
line_list = content_file.readlines()
result = {
"customerrors": True if os.getenv("HAPROXY_CUSTOMERRORS") == "true" else False
@ -18,7 +18,7 @@ if os.getenv("HAPROXY_PASSWORD"):
result["lookup_label"] = os.getenv("EASYHAPROXY_LABEL_PREFIX") if os.getenv("EASYHAPROXY_LABEL_PREFIX") else "easyhaproxy"
cfg = HaproxyConfigGenerator(result)
print(cfg.generate(lineList))
print(cfg.generate(line_list))
path = os.path.dirname(os.path.realpath(__file__))
with open(path + "/letsencrypt_hosts.txt", 'w') as fp: