Ok, so I have a job that runs and depends on files in Dropbox. Essentially I have a checkpoint to make sure that dropbox isn't downloading new files before running the job.
Here's the code:
Code:
CUR_STATUS=$(dropbox status)
if [ "$CUR_STATUS" = "Up to date" ]; then
echo "$CUR_STATUS" > $DIR/test.log
else
echo "dropbox isn't updated" > $DIR/test.log
echo "status is : +$(/usr/bin/dropbox status)+" >> $DIR/test.log
echo "running is : +$(/usr/bin/dropbox running)+" >> $DIR/test.log
echo "whoami: +$(whoami)+" >> $DIR/test.log
echo "debug early exit" >> $DIR/test.log
exit_flag=1
fi
There's a few extra lines for debugging purposes but essentially this WORKS when running the script manually in terminal. AND it also ran under cron in a Ubuntu machine until we decided to move over to CentOS where it has now broken.
I think the problem lies in CRON but cannot work out why or how?
Andrew
Bookmarks