mirror of
https://github.com/cimryan/teslausb.git
synced 2026-03-01 04:30:33 +00:00
Abstract connect-archive.sh and disconnect-archive.sh
This commit is contained in:
@@ -18,12 +18,7 @@ export -f log
|
||||
|
||||
log "Starting..."
|
||||
|
||||
if [ -r "/root/.teslaCamRsyncConfig" ]
|
||||
then
|
||||
/root/bin/connect-archive-rsync.sh
|
||||
else
|
||||
/root/bin/connect-archive-cifs.sh
|
||||
fi
|
||||
/root/bin/connect-archive.sh
|
||||
|
||||
disconnect_usb_drives_from_host
|
||||
|
||||
@@ -33,12 +28,7 @@ fix_errors_in_cam_file
|
||||
|
||||
/root/bin/archive-clips.sh
|
||||
|
||||
if [ -r "/root/.teslaCamRsyncConfig" ]
|
||||
then
|
||||
/root/bin/disconnect-archive-rsync.sh
|
||||
else
|
||||
/root/bin/disconnect-archive-cifs.sh
|
||||
fi
|
||||
/root/bin/disconnect-archive.sh
|
||||
|
||||
unmount_cam_file
|
||||
|
||||
|
||||
@@ -188,20 +188,20 @@ function configure_archive_scripts () {
|
||||
wget https://raw.githubusercontent.com/"$REPO"/teslausb/"$BRANCH"/rsync_archive/archive-clips.sh
|
||||
chmod +x archive-clips.sh
|
||||
|
||||
wget https://raw.githubusercontent.com/"$REPO"/teslausb/"$BRANCH"/rsync_archive/connect-archive-rsync.sh
|
||||
chmod +x connect-archive-rsync.sh
|
||||
wget https://raw.githubusercontent.com/"$REPO"/teslausb/"$BRANCH"/rsync_archive/connect-archive.sh
|
||||
chmod +x connect-archive.sh
|
||||
|
||||
wget https://raw.githubusercontent.com/"$REPO"/teslausb/"$BRANCH"/rsync_archive/disconnect-archive-rsync.sh
|
||||
chmod +x disconnect-archive-rsync.sh
|
||||
wget https://raw.githubusercontent.com/"$REPO"/teslausb/"$BRANCH"/rsync_archive/disconnect-archive.sh
|
||||
chmod +x disconnect-archive.sh
|
||||
else
|
||||
wget https://raw.githubusercontent.com/"$REPO"/teslausb/"$BRANCH"/windows_archive/archive-clips.sh
|
||||
chmod +x archive-clips.sh
|
||||
|
||||
wget https://raw.githubusercontent.com/"$REPO"/teslausb/"$BRANCH"/windows_archive/connect-archive-cifs.sh
|
||||
chmod +x connect-archive-cifs.sh
|
||||
wget https://raw.githubusercontent.com/"$REPO"/teslausb/"$BRANCH"/windows_archive/connect-archive.sh
|
||||
chmod +x connect-archive.sh
|
||||
|
||||
wget https://raw.githubusercontent.com/"$REPO"/teslausb/"$BRANCH"/windows_archive/disconnect-archive-cifs.sh
|
||||
chmod +x disconnect-archive-cifs.sh
|
||||
wget https://raw.githubusercontent.com/"$REPO"/teslausb/"$BRANCH"/windows_archive/disconnect-archive.sh
|
||||
chmod +x disconnect-archive.sh
|
||||
fi
|
||||
popd
|
||||
echo "Configured the archive scripts."
|
||||
|
||||
Reference in New Issue
Block a user