#!/bin/bash

umount "/mnt/user/Cloud/gdrive"
umount "/mnt/user/Cloud/tdrive"
fusermount -uz "/mnt/user/Cloud/gdrive"
fusermount -uz "/mnt/user/Cloud/tdrive"

rclone rc --rc-addr=192.168.10.222:5573 \
--rc-user=cartache \
--rc-pass=Cartache1X \
mount/unmountall

rclone rc --rc-addr=192.168.10.222:5573 \
--rc-user=cartache \
--rc-pass=Cartache1X \
--log-file=/mnt/user/logs/rclone/rclone-mount-gdrive.log \
mount/mount fs=gdrive: mountPoint=/mnt/user/Cloud/gdrive \
mountOpt='{
    "AllowOther": true, 
    "AsyncRead": true 
    }' \
vfsOpt='{
    "CacheMode": 3, 
    "DirCacheTime": 3600000000000000, 
    "PollInterval": 15000000000, 
    "CacheMaxAge": 1209600000000000
    }'

rclone rc --rc-addr=192.168.10.222:5573 \
--rc-user=cartache \
--rc-pass=Cartache1X \
--log-file=/mnt/user/logs/rclone/rclone-mount-tdrive.log \
mount/mount fs=tdrive: mountPoint=/mnt/user/Cloud/tdrive \
mountOpt='{
    "AllowOther": true, 
    "AsyncRead": true 
    }' \
vfsOpt='{
    "CacheMode": 3, 
    "DirCacheTime": 3600000000000000, 
    "PollInterval": 15000000000, 
    "CacheMaxAge": 1209600000000000
    }'

#vfsOpt='{
#    "CacheMode": 3, 
#    "DirCacheTime": 3600000000000000, 
#    "PollInterval": 15000000000, 
#    "CacheMaxAge": 1209600000000000,
#    "CacheMaxSize": 500000000000000
#    }'