1
0
mirror of https://github.com/Mailu/Mailu.git synced 2024-12-12 10:45:38 +02:00

Start crond when POSTFIX_LOG_FILE is set

This commit is contained in:
Dimitri Huisman 2021-12-14 15:47:16 +00:00
parent 53975684b8
commit fdb10cfb85

View File

@ -85,9 +85,10 @@ if "RELAYUSER" in os.environ:
# Configure and start local rsyslog server
conf.jinja("/conf/rsyslog.conf", os.environ, "/etc/rsyslog.conf")
os.system("/usr/sbin/rsyslogd -n &")
# Configure logrotate
# Configure logrotate and start crond
if os.environ["POSTFIX_LOG_FILE"] != "":
conf.jinja("/conf/logrotate.conf", os.environ, "/etc/logrotate.d/postfix.conf")
os.system("/usr/sbin/crond")
if os.path.exists("/overrides/logrotate.conf"):
shutil.copyfile("/overrides/logrotate.conf", "/etc/logrotate.d/postfix.conf")