Hi,
 
I have written a following shell script:
 
#!/bin/bash
# Script to check exim mailq at a specified interval
echo `date` >> /adminscripts/logs/eximcount
echo `exim -bpc` >> /adminscripts/logs/eximcount
if [ `exim -bpc` -gt 0 ]
then
cat /adminscripts/logs/eximcount |mail -s "Count of EXIM Mailq on Server"  
a.sha...@example.com
else
exit 1
fi

 
The above runs fine manually, however when I try to run it through crontab (as 
root), it DOES run but /adminscripts/logs/eximcount
gets empty value. When I run it manually it is able to get the correct count 
like 5, 10 etc.
 
What am I missing here? Please help.
    
Thanks and Regards,
Amit Sharma
_______________________________________________
Ilugd mailing list
Ilugd@lists.linux-delhi.org
http://frodo.hserus.net/mailman/listinfo/ilugd

Reply via email to