Changed syslogd to keep only 2 log files

This commit is contained in:
myve 2025-03-12 12:21:35 +00:00
commit d15308a613

View file

@ -22,14 +22,14 @@ ${reset}"
} }
# Reset logs # Reset logs
for log in /var/log/mail/maillog{,.{0..9}} /var/log/mail/maillog.debug{,.{0..9}} /var/log/mail/reject.log for log in /var/log/mail/maillog{,.0} /var/log/mail/maillog.debug{,.0} /var/log/mail/reject.log
do do
if [ ! -f ${log} ] if [ ! -f ${log} ]
then then
touch ${log} touch ${log}
fi fi
done done
syslogd -O /var/log/mail/maillog -s ${MYVEMAIL_LOG_SIZE:-2000000} -b 10 syslogd -s ${MYVEMAIL_LOG_SIZE:-2000000} -b 2 # -O /var/log/mail/maillog
# Run all scripts in init folder # Run all scripts in init folder
for file in /docker-entrypoint/init.d/*.sh for file in /docker-entrypoint/init.d/*.sh
@ -43,4 +43,4 @@ postfix reload &&
echo -e "\n\e[1;32mMail service is ready\e[0m\n" echo -e "\n\e[1;32mMail service is ready\e[0m\n"
# Monitor log # Monitor log
tail -f /var/log/mail/maillog.debug{,.{0..9}} # /var/log/mail/maillog{,.{0..9}} tail -f /var/log/mail/maillog.debug{,.0} # /var/log/mail/maillog{,.0}