Initial rsync support (untested)

Currently untested, but the main idea is there
Currently it's either the normal archive server or rsync; not both, which is something to consider when adding things like gdrive and s3 (make it more modular?)
This commit is contained in:
Gocnak
2018-10-20 03:26:08 -04:00
parent 29a79bf45e
commit 002d1e6f6c
5 changed files with 103 additions and 13 deletions

View File

@@ -81,11 +81,22 @@ function move_clips_to_archive () {
done
log "Moved $move_count file(s)."
if [ -r "/root/.teslaCamPushoverCredentials" ] && [ $move_count > 0 ]
if [ $move_count > 0]
then
log "Sending Pushover message for copied files."
/root/bin/send-pushover $move_count
if [ -r "/root/.teslaCamRsyncConfig" ]
then
log "Archiving through rsync..."
/root/bin/archive-rsync
fi
if [ -r "/root/.teslaCamPushoverCredentials" ]
then
log "Sending Pushover message for copied files."
/root/bin/send-pushover $move_count
fi
fi
log "Finished moving clips to archive."
}