1
I have some script that sending email to me from server:
#!/bin/bash
DWATYG=$(date +%d.%m.%Y -d '16 days ago')
RAPORT=$(ausearch -i -k RBS -ts $DWATYG)
echo "$RAPORT" | mutt -s "Raport RBS" my@email.com
This script launched from crontab. For every time I got empty email, without message body. If I run this commands from command line everything is ok. What's the problem?
Try running the script from outside the directory it is located in (for example, navigate to /tmp and then call it from there with the full path). Does it run fine or generate an error? – Richard – 2014-07-15T12:20:22.113
No errors. Emails have report from ausearch tool. But if this script is runned from crontab emails are empty. – QkiZ – 2014-07-15T12:24:42.177