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,35 @@
#!/bin/bash -eu
export LOG_FILE=/tmp/archive-teslacam-clips.log
export ARCHIVE_MOUNT=/mnt/archive
function log () {
echo "$( date )" >> "$LOG_FILE"
echo "$1" >> "$LOG_FILE"
}
function disconnect_usb_drives_from_host () {
log "Disconnecting usb from host..."
modprobe -r g_mass_storage
log "Disconnected usb from host."
}
export -f log
log "Starting..."
/root/bin/connect-archive.sh
disconnect_usb_drives_from_host
ensure_cam_file_is_mounted
fix_errors_in_cam_file
/root/bin/archive-clips.sh
/root/bin/disconnect-archive.sh
unmount_cam_file
connect_usb_drives_to_host