From 62ead8888e1253a2111a8e396e791a03d084c74c Mon Sep 17 00:00:00 2001 From: casperklein Date: Thu, 29 Feb 2024 20:32:16 +0100 Subject: [PATCH] alter config file regardless if fail2ban is enabled or not --- target/scripts/startup/setup.d/security/misc.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/target/scripts/startup/setup.d/security/misc.sh b/target/scripts/startup/setup.d/security/misc.sh index 61ccc497..df810b2e 100644 --- a/target/scripts/startup/setup.d/security/misc.sh +++ b/target/scripts/startup/setup.d/security/misc.sh @@ -204,14 +204,13 @@ function __setup__security__fail2ban() { fi echo '[Definition]' >/etc/fail2ban/filter.d/custom.conf - - _log 'trace' 'Configuring fail2ban logrotate rotate count and interval' - sedfile -i "s|rotate 4$|rotate ${LOGROTATE_COUNT}|" /etc/logrotate.d/fail2ban - sedfile -i "s|weekly$|${LOGROTATE_INTERVAL}|" /etc/logrotate.d/fail2ban else _log 'debug' 'Fail2Ban is disabled' rm -f /etc/logrotate.d/fail2ban fi + _log 'trace' 'Configuring fail2ban logrotate rotate count and interval' + sedfile -i "s|rotate 4$|rotate ${LOGROTATE_COUNT}|" /etc/logrotate.d/fail2ban + sedfile -i "s|weekly$|${LOGROTATE_INTERVAL}|" /etc/logrotate.d/fail2ban } function __setup__security__amavis() {