mirror of
https://github.com/cimryan/teslausb.git
synced 2026-03-01 04:30:33 +00:00
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:
@@ -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
|
||||
Reference in New Issue
Block a user