#/bin/bash FTPU="username" FTPP="ftp password" FTPS="remote ftp server" FTPF="remote ftp server directory" LOCALD="/home/user/MyDocs/DCIM" LOGFILE="/tmp/backup.log" if ifconfig | grep -q -e 192.168.1.200 then echo Started Pictures Backup at: `date` >> $LOGFILE /opt/lftp/bin/lftp -u $FTPU,$FTPP -e " set ftp:ssl-allow no;set ssl:verify-certificate no; mirror --only-newer --verbose --continue --reve$ echo Pictures Update Finished at: `date` >> $LOGFILE else echo "Not at home, not synching anything: `date`" >> $LOGFILE fi