#!/bin/bash
#----------------------------------------------------------------------------
# This script mounts your remote share with the recommended options.         |
# Just define the remote you wish to mount as well as the local mountpoint.  |
# The script will create a folder at the mountpoint                          |
#----------------------------------------------------------------------------
#mkdir -p /mnt/cache/gdrive
#mkdir -p /mnt/cache/tdrive
#mkdir -p /mnt/cache/gphotos
GDRIVE="/mnt/user/Google/gdrive"
TDRIVE="/mnt/user/Google/tdrive"

rclone mount gdrive: $GDRIVE \
--allow-other \
--size-only \
--uid=1000 --gid=1000 \
--umask 002 \
--log-file=/mnt/user/logs/rclone/rclone-gdrive.log \
--log-level ERROR \
--timeout 1h \
--dir-cache-time 2m \
--vfs-cache-max-age 72h \
--vfs-read-chunk-size 64M \
--vfs-read-chunk-size-limit 5G \
--drive-chunk-size 128M \
--buffer-size 64M \
--user-agent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36' &

rclone mount tdrive: $TDRIVE \
--allow-other \
--size-only \
--uid=1000 \
--gid=1000 \
--umask 002 \
--log-file=/mnt/user/logs/rclone/rclone-tdrive.log \
--log-level ERROR \
--timeout 1h \
--dir-cache-time 2m \
--vfs-cache-max-age 72h \
--vfs-read-chunk-size 64M \
--vfs-read-chunk-size-limit 5G \
--drive-chunk-size 128M \
--buffer-size 64M \
--user-agent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36' &

#rclone mount gphotos: /mnt/cache/gphotos \
#--allow-other \
#--size-only \
#--uid=1000 --gid=1000 \
#--umask 002 \
#--log-file=/mnt/user/logs/rclone/rclone-gdrive.log \
#--log-level ERROR \
#--timeout 1h \
#--dir-cache-time 2m \
#--vfs-cache-max-age 72h \
#--vfs-read-chunk-size 64M \
#--vfs-read-chunk-size-limit 5G \
#--drive-chunk-size 128M \
#--buffer-size 64M \
#--user-agent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36' &