modifying existing cron script [long-sorry]

Robert Holtzman holtzm at cox.net
Mon May 24 04:24:24 UTC 2010


Background:
I installed logwatch but it doesn't mail daily reports to my inbox
without an mta. I installed exim4 and the default installation gave me
reports but would not connect to a remote server. When I configured it
to send to my isp's smtp server it stopped sending logwatch reports.
Tried the msmtp mta but had the same problem. Noticed logwatch has a
"--mailto address" option. Checked /etc/cron.daily and found:

#!/bin/bash

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

#execute
/usr/sbin/logwatch --mailto 

Now for the question. /var/spool/cron/crontabs
Most sites say not to edit /etc/cron.daily including the Ubuntu site
https://help.ubuntu.com/community/CronHowto

However, http://www.unixgeeks.org/security/newbie/unix/cron-1.html says
in part

"In the /etc directory you will probably find some sub directories
called 
'cron.hourly', 'cron.da/etc/cron.dailyily', 'cron.weekly' and 'cron.monthly'. If you
place 
a script into one of those directories it will be run either hourly,
daily, 
weekly or monthly, depending on the name of the directory. 

If you want more flexibility than this, you can edit a crontab (the name 
for cron's config files). The main config file is normally
/etc/crontab."

indicating these files can be manually edited. Now I'm confused. Is it
or not possible to edit /etc/cron.daily? I would like to add my email
address to the "--mailto" entry.


-- 
Bob Holtzman
Key ID: 8D549279
"If you think you're getting free lunch,
 check the price of the beer"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20100523/738f6889/attachment.sig>


More information about the ubuntu-users mailing list