21 lines
433 B
Bash
21 lines
433 B
Bash
#!/bin/bash
|
|
|
|
video_file_path=/data/nfs-share/OneDriveSync/
|
|
rclone_remote=office-wdd
|
|
rclone_log_path=/data/rlone_sync/rclone-to-onedrive.log
|
|
|
|
rclone_sync_from_onedrive(){
|
|
|
|
echo "[$(date --rfc-3339=seconds | cut -d"+" -f1 | sed "s/ /-/g" | sed "s/:/-/g")] sync from OneDrive"
|
|
rclone copy "$rclone_remote":/TransVideos "$video_file_path" -P >> $rclone_log_path
|
|
|
|
}
|
|
|
|
|
|
while true; do
|
|
|
|
rclone_sync_from_onedrive
|
|
sleep 15
|
|
|
|
done
|