mirror of
https://github.com/cimryan/teslausb.git
synced 2026-03-01 04:30:33 +00:00
Rename archive-rsync to archive-rsync.sh
This commit is contained in:
16
windows_archive/archive-rsync.sh
Normal file
16
windows_archive/archive-rsync.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash -eu
|
||||
|
||||
log "Archiving through rsync..."
|
||||
|
||||
source /root/.teslaCamRsyncConfig
|
||||
|
||||
num_files_moved=$(rsync -auvh --stats --log-file=/tmp/archive-rsync-cmd.log /mnt/cam/TeslaCam/saved* $user@$server:$path | awk '/files transferred/{print $NF}')
|
||||
|
||||
/root/bin/send-pushover "$num_files_moved"
|
||||
|
||||
if [ $num_files_moved > 0 ]
|
||||
then
|
||||
log "Successfully synced files through rsync."
|
||||
else
|
||||
log "No files to archive through rsync."
|
||||
fi
|
||||
Reference in New Issue
Block a user