The following script runs from a command prompt. However, it doesn't run from my cronjob on my Debian box, other cronjob run. At first I specified the path, then I put the script in /usr/bin. It still doesn't the script has the same permission and owner as "mrtg". mrtg runs correctly from the cronjob.
if [ "$raid" == "$OK" ]; then
echo "BACH raid working" | mail email@example.com
echo "BACH raid NOT working" | mail firstname.lastname@example.org