aports/main/fail2ban/fail2ban.logrotate
Henrik Riomar 522044cc81 main/fail2ban: fix logging after rotate
fail2ban stops updating /var/log/fail2ban.log after rotation, this
change fixes that problem.

According to the docs at:
  https://www.fail2ban.org/wiki/index.php/Commands#LOGGING
we shall call "flushlogs" after rotation.

Closes #11382
2020-08-07 12:43:05 +00:00

11 lines
230 B
Text

/var/log/fail2ban.log {
daily
rotate 7
missingok
compress
postrotate
/usr/bin/fail2ban-client flushlogs 1>/dev/null || true
chown :wheel /var/log/fail2ban.log
chmod 640 /var/log/fail2ban.log
endscript
}