Logwatch Email Report Sent Twice Every Day
My cronjob for logwatch looks like this:
m h dom mon dow command
0 1 * * * /usr/sbin/logwatch
Root is the only user who can run crons. But I get it twice every day within about 20 minutes of each other instead of just once. It's a dupe report of course. Does anyone have any clues as to why it is sent twice?
Best regards
Jacqueline
2 Replies
#!/bin/bash
#Check if removed-but-not-purged
test -x /usr/share/logwatch/scripts/logwatch.pl || exit 0
#execute
/usr/sbin/logwatch --output mail
#Note: It's possible to force the recipient in above command
#Just pass --mailto address@a.com instead of --output mail
Thank you.