mirror of
https://github.com/cimryan/teslausb.git
synced 2026-03-01 04:30:33 +00:00
Make send-pushover safe to always invoke, and always invoke it. Split CIFS archiving to archive-cifs.sh
This commit is contained in:
18
windows_archive/archive-cifs.sh
Normal file
18
windows_archive/archive-cifs.sh
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash -eu
|
||||
|
||||
log "Moving clips to archive..."
|
||||
|
||||
local move_count=0
|
||||
|
||||
for file_name in "$CAM_MOUNT"/TeslaCam/saved*; do
|
||||
[ -e "$file_name" ] || continue
|
||||
log "Moving $file_name ..."
|
||||
mv -- "$file_name" "$ARCHIVE_MOUNT" >> "$LOG_FILE" 2>&1 || echo ""
|
||||
log "Moved $file_name."
|
||||
move_count=$((move_count + 1))
|
||||
done
|
||||
log "Moved $move_count file(s)."
|
||||
|
||||
/root/bin/send-pushover "$num_files_moved"
|
||||
|
||||
log "Finished moving clips to archive."
|
||||
Reference in New Issue
Block a user