rsync will not be using the mnt/archive folder

It'll instead bypass and just call itself on its own
This commit is contained in:
Gocnak
2018-10-20 05:30:57 -04:00
parent b60b787953
commit de3371f00c
3 changed files with 23 additions and 16 deletions

View File

@@ -7,6 +7,16 @@ function log () {
source /root/.teslaCamRsyncConfig
rsync -au /mnt/archive $user@$server:$path
nfiles=$(rsync -auh --stats /mnt/cam/TeslaCam/saved* $user@$server:$path | awk '/files transferred/{print $NF}')
log "Successfully synced files through rsync!"
if [ $nfiles > 0 ]
then
if [ -r "/root/.teslaCamPushoverCredentials" ] && [ $nfiles > 0]
then
log "Sending Pushover message for copied files."
/root/bin/send-pushover $nfiles
fi
log "Successfully synced files through rsync!"
else
log "No files to archive through rsync!"
fi