Separate files into those used for setup and those used at runtime.

Files used for both will go in the run tree.
This commit is contained in:
cimryan
2018-10-24 20:55:29 -07:00
parent ef10b2ec67
commit e875763e58
27 changed files with 0 additions and 0 deletions

View 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