mirror of
https://github.com/cimryan/teslausb.git
synced 2026-03-01 04:30:33 +00:00
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:
35
run/archive-teslacam-clips
Normal file
35
run/archive-teslacam-clips
Normal 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
|
||||
Reference in New Issue
Block a user