Fix the dovecot startup script

master
kaiyou 7 years ago
parent 3dac7fc597
commit 1b13728df3

@ -10,11 +10,9 @@ convert = lambda src, dst: open(dst, "w").write(jinja2.Template(open(src).read()
# Actual startup script # Actual startup script
os.environ["FRONT_ADDRESS"] = socket.gethostbyname("front") os.environ["FRONT_ADDRESS"] = socket.gethostbyname("front")
for postfix_file in glob.glob("/conf/*.cf"): for dovecot_file in glob.glob("/conf/*"):
convert(postfix_file, os.path.join("/etc/postfix", os.path.basename(postfix_file))) convert(dovecot_file, os.path.join("/etc/dovecot", os.path.basename(dovecot_file)))
convert("/conf/rsyslog.conf", "/etc/rsyslog.conf")
# Run postfix # Run postfix
os.system("chown -R mail:mail /mail /var/lib/dovecot") os.system("chown -R mail:mail /mail /var/lib/dovecot")
os.execv("/usr/sbin/dovecot" ["dovecot", "-c", "/etc/dovecot/dovecot.conf", "-F"]) os.execv("/usr/sbin/dovecot", ["dovecot", "-c", "/etc/dovecot/dovecot.conf", "-F"])

Loading…
Cancel
Save