diff --git a/cifs_archive/archive-clips.sh b/cifs_archive/archive-clips.sh index e1b3a17..26b634f 100644 --- a/cifs_archive/archive-clips.sh +++ b/cifs_archive/archive-clips.sh @@ -2,17 +2,17 @@ log "Moving clips to archive..." -move_count=0 +NUM_FILES_MOVED=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)) + NUM_FILES_MOVED=$((NUM_FILES_MOVED + 1)) done -log "Moved $move_count file(s)." +log "Moved $NUM_FILES_MOVED file(s)." -/root/bin/send-pushover "$num_files_moved" +/root/bin/send-pushover "$NUM_FILES_MOVED" log "Finished moving clips to archive."