[Thamesvalley-pm] scripting question

Paul Johnson paul at pjcj.net
Tue Aug 14 06:01:48 PDT 2007


On Tue, Aug 14, 2007 at 01:47:20PM +0100, Greg Matthews wrote:

> I have a perl script (attached) which runs as a cron job. When I run it 
> as root from the command line it produces a good report but when it is 
> run from cron, the bitdefender statistics never get printed. Its as if 
> the %bitdef and %bitdef_today hashes dont get populated.

Cron problems are almost invariably due to environment or permissions
problems.  In your case I would tend to be suspicious of the ssh call,
in in particular of the permissions of the identify file.

>     $TMPLOG .=  `ssh  -l root -i /etc/mail/.ssh/vid $relay "egrep -i :INFECTED:  /var/log/maillog" `

-- 
Paul Johnson - paul at pjcj.net
http://www.pjcj.net


More information about the Thamesvalley-pm mailing list