|
|
@ -4,11 +4,13 @@ import jinja2
|
|
|
|
import os
|
|
|
|
import os
|
|
|
|
import socket
|
|
|
|
import socket
|
|
|
|
import glob
|
|
|
|
import glob
|
|
|
|
|
|
|
|
|
|
|
|
convert = lambda src, dst: open(dst, "w").write(jinja2.Template(open(src).read()).render(**os.environ))
|
|
|
|
convert = lambda src, dst: open(dst, "w").write(jinja2.Template(open(src).read()).render(**os.environ))
|
|
|
|
|
|
|
|
|
|
|
|
# Actual startup script
|
|
|
|
# Actual startup script
|
|
|
|
os.environ["FRONT_ADDRESS"] = socket.gethostbyname("front")
|
|
|
|
os.environ["FRONT_ADDRESS"] = socket.gethostbyname("front")
|
|
|
|
|
|
|
|
if os.environ["WEBMAIL"] != "none":
|
|
|
|
|
|
|
|
os.environ["WEBMAIL_ADDRESS"] = socket.gethostbyname("webmail")
|
|
|
|
|
|
|
|
|
|
|
|
for dovecot_file in glob.glob("/conf/*"):
|
|
|
|
for dovecot_file in glob.glob("/conf/*"):
|
|
|
|
convert(dovecot_file, os.path.join("/etc/dovecot", os.path.basename(dovecot_file)))
|
|
|
|
convert(dovecot_file, os.path.join("/etc/dovecot", os.path.basename(dovecot_file)))
|
|
|
|