Hi, wasnt sure if this qualified as Power - but here goes.
Also I have spent a long time trying to get this work, and searched S3cmd forums etc
Anyhoo - I am trying to setup the pi as a drop and leave upload machine - plug it in, turn it on and it will scan a folder for files - upload them to Amazon S3 if so - I have all parts of the process working - I am writing a log file on start and moving it when the job is done to prevent from Cron starting a new process while the file exists etc.
This works, but I cannot get S3cmd to work from Cron - works fine when calling the script via ./myscript on CLI.
Have tried putting the full path /usr/bin/s3cmd in the script, calling a new /root/.s3cfg file so that cron (if running as root) can access the key information etc.
But I just cannot get it to work:
* * * * * /media/USBflash/s3rcron_test
is my crontab entry (media/USBflash is a thumbdrive vfat format)
if [ -f /media/USBflash/log.log ]
echo "still running" | tee /media/USBflash/log.log
echo "starting job `date +%m%d-%H%M`" >> /media/USBflash/log.log
/usr/bin/s3cmd put --confgure /root/.s3cfg —-include '*.mp4' --guess-mime-ty$
mv /media/USBflash/log.log /media/USBflash/logs/`date +%m%d%H%M`.log
mv /media/USBflash/*.mp4 /media/USBflash/done/
I tried with/without the --configure option but no difference.
But it will not execute - no output from s3cmd I can find even if I log the output.
Just cant seem to figure it out. as I say calling the script from CLI works fine.
So I'm wondering if its some Pi related configuration that I've missed.