#!/bin/bash

log_file=flims_cron.log

echo "STARTING MOVIES FILE SYNC RAN AT: " `date '+%Y-%m-%d %H:%M:%S'` > /home/$USER/logs/$log_file ; 
/usr/bin/rsync -avz --no-perms --no-owner --no-group --stats --progress --exclude=/home/$USER/shares/disk1/film -e "ssh -i /home/$USER/.ssh/id_rsa_what " invalid@mir.whatbox.ca:/home/invalid/files/_movies/ /home/$USER/shares/disk1/film >> /home/$USER/logs/$log_file
echo "CRON MOVIES FILE SYNC RAN AT: " `date '+%Y-%m-%d %H:%M:%S'` >> /home/$USER/logs/$log_file
/usr/bin/chmod 777 -R /home/$USER/shares/disk1/film > /home/$USER/logs/chmod_film.log
echo "CRON CHMOD FILM RAN AT: " `date '+%Y-%m-%d %H:%M:%S'` >> /home/$USER/logs/chmod_film.log