adding support and documentation for using rclone

This commit is contained in:
Ray Tanaka
2018-10-25 15:18:06 -07:00
parent 5dd38ffcb8
commit 9bb8f1e046
7 changed files with 123 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
#!/bin/bash -eu
log "Moving clips to rclone archive..."
source /root/.teslaCamRcloneConfig
NUM_FILES_MOVED=0
for file_name in "$CAM_MOUNT"/TeslaCam/saved*; do
[ -e "$file_name" ] || continue
log "Moving $file_name ..."
rclone move "$file_name" "$drive:$path" >> "$LOG_FILE" 2>&1 || echo ""
log "Moved $file_name."
NUM_FILES_MOVED=$((NUM_FILES_MOVED + 1))
done
log "Moved $NUM_FILES_MOVED file(s)."
/root/bin/send-pushover "$NUM_FILES_MOVED"
log "Finished moving clips to rclone archive"

View File

@@ -0,0 +1,10 @@
#!/bin/bash -eu
function configure_archive () {
echo "Configuring the archive for Rclone..."
echo "drive=$RCLONE_DRIVE" > /root/.teslaCamRcloneConfig
echo "path=$RCLONE_PATH" >> /root/.teslaCamRcloneConfig
}
configure_archive

View File

@@ -0,0 +1,2 @@
#!/bin/bash -eu
# Nothing to do.

View File

@@ -0,0 +1,2 @@
#!/bin/bash -eu
# Nothing to do.

View File

@@ -0,0 +1 @@
#!/bin/bash -eu