Update misc.sh

This commit is contained in:
Ivan Filonenko 2025-07-10 17:21:14 +02:00 committed by GitHub
parent 20798411a3
commit f5027776dc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -202,13 +202,14 @@ function __setup__security__fail2ban() {
fi
echo '[Definition]' >/etc/fail2ban/filter.d/custom.conf
_log 'trace' 'Configuring fail2ban logrotate rotate count and interval'
[[ ${LOGROTATE_COUNT} -ne 4 ]] && sedfile -i "s|rotate 4$|rotate ${LOGROTATE_COUNT}|" /etc/logrotate.d/fail2ban
[[ ${LOGROTATE_INTERVAL} != "weekly" ]] && 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'
[[ ${LOGROTATE_COUNT} -ne 4 ]] && sedfile -i "s|rotate 4$|rotate ${LOGROTATE_COUNT}|" /etc/logrotate.d/fail2ban
[[ ${LOGROTATE_INTERVAL} != "weekly" ]] && sedfile -i "s|weekly$|${LOGROTATE_INTERVAL}|" /etc/logrotate.d/fail2ban
}
function __setup__security__amavis() {