yboetz / motd

Collection of 'message of the day' scripts
889 stars 105 forks source link

Update 50-fail2ban to use GNU zgrep to gracefully handle logrotates default gzip of old logfiles #9

Closed TrooperT closed 5 years ago

TrooperT commented 5 years ago

change initial file read to use zgrep [part of GNU gzip package] to gracefully handle gzipped and non-gzipped log files.

may be applicable in more places but this was the one that stood out to me.

yboetz commented 5 years ago

Hi

You can use zgrep yes, but it is slightly slower than grep, and I keep my logfiles uncompressed, that's why I want to keep using grep. This is my personal source repository for all motd-scripts, so I'll keep grep here, but please continue to use zgrep in your case :).

Thanks!