fix: Ensure main log file is tailed from the start

This commit is contained in:
Brennan Kinney 2024-08-01 10:08:30 +12:00 committed by GitHub
parent a338c06639
commit 565131f77a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -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