From 565131f77af1b1bc665836da94dcde0f9af5615a Mon Sep 17 00:00:00 2001 From: Brennan Kinney <5098581+polarathene@users.noreply.github.com> Date: Thu, 1 Aug 2024 10:08:30 +1200 Subject: [PATCH] fix: Ensure main log file is tailed from the start --- target/scripts/start-mailserver.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/target/scripts/start-mailserver.sh b/target/scripts/start-mailserver.sh index cbe38da9..ca968fa5 100755 --- a/target/scripts/start-mailserver.sh +++ b/target/scripts/start-mailserver.sh @@ -199,5 +199,8 @@ _start_daemons _log 'info' "${HOSTNAME} is up and running" +# NOTE: This file should already exist with log output from rsyslogd: touch /var/log/mail/mail.log -exec tail -Fn 0 /var/log/mail/mail.log +# Container logs will receive updates to this log file, +# `-n +0` ensures we output to stdout from the first line of the file. +exec tail -Fn +0 /var/log/mail/mail.log