mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-08-07 21:16:59 +02:00
Merge pull request #1 from SpeedyGonzaless/SpeedyGonzaless-fix-logrotate-fail2ban
Update misc.sh
This commit is contained in:
commit
eb0f1bf4a4
@ -202,13 +202,14 @@ function __setup__security__fail2ban() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo '[Definition]' >/etc/fail2ban/filter.d/custom.conf
|
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
|
else
|
||||||
_log 'debug' 'Fail2Ban is disabled'
|
_log 'debug' 'Fail2Ban is disabled'
|
||||||
rm -f /etc/logrotate.d/fail2ban
|
rm -f /etc/logrotate.d/fail2ban
|
||||||
fi
|
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() {
|
function __setup__security__amavis() {
|
||||||
|
Loading…
Reference in New Issue
Block a user