view common/0logwatch @ 187:6c260427a94c puppet-3.6

Reduce Apache Instaban ban duration to reduce reboot time We're getting flooded with hundreds of failures per day, which keeps nearly 1000 entries in Fail2Ban, which then "unbans" each and every IP on stop. As the system only does a few unbans per second then this can take three minutes to stop (e.g. at shutdown)! May need to alter "repeat offender" in future
author IBBoard <dev@ibboard.co.uk>
date Sat, 02 Feb 2019 16:30:40 +0000
parents 956e484adc12
children
line wrap: on
line source

#!/bin/bash

DailyReport=`grep -e "^[[:space:]]*DailyReport[[:space:]]*=[[:space:]]*" /usr/share/logwatch/default.conf/logwatch.conf | head -n1 | sed -e "s|^\s*DailyReport\s*=\s*||"`

if [ "$DailyReport" != "No" ] && [ "$DailyReport" != "no" ]
then
    logwatch
fi