Printable Version of Topic

Click here to view this topic in its original format

Linuxhelp _ Technical Support _ cron and lftp issue

Posted by: aristosv Jul 19 2015, 11:46 PM

I have the following scripts running on raspbian.

start

CODE
#!/bin/bash
/root/config/commands 2>&1 > /root/log/$HOSTNAME.log


commands
CODE
#!/bin/bash
source /root/config/variables
echo TestLine
/usr/bin/lftp ftp://user:pass@host.com -e "set ftp:ssl-allow no; set net:reconnect-interval-base 5; set net:max-retries 2; mirror -e /testgroup/music /root/media; quit"
/usr/bin/mail -s "$HOSTNAME Report" $emailaddress < $logdir/$HOSTNAME.log


When I run "start" manually I receive the email below

CODE
TestLine
Total: 1 directory, 4 files, 0 symlinks


When I run it using cron, I get the following email

CODE
TestLine


Any idea why would cron strip the lftp output from the email?

Thanks.

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)