#!/bin/bash

#Check if removed-but-not-purged
test -x /usr/share/logwatch/scripts/logwatch.pl || exit 0

#execute
/usr/sbin/logwatch --output mail

#write to web-servable folder
/usr/sbin/logwatch > /var/www/logwatch/`date +%Y-%m-%d`.log

#Note: It's possible to force the recipient in above command
#Just pass --mailto address@a.com instead of --output mail

