I'm trying to configure a bash script which will connect two drives using rclone upon startup, currently I have one drive successfully connecting but when I try to get two working - only one does.
rclone v1.59.1
- os/version: ubuntu 20.04 (64 bit)
- os/kernel: 5.17.5-76051705-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.18.5
- go/linking: static
- go/tags: none
I am trying to connect two separate Uptobox accounts.
# Variables
CACHEDIR="/home/path/cache"
RCLONEOPTIONS="--daemon --allow-other -v --transfers 16 --vfs-cache-mode full --cache-dir=${CACHEDIR}"
RCLONEDRIVE1="uptobox:"
LOCALMOUNTPOINT1="path"
RCLONEDRIVE2="up2box:"
LOCALMOUNTPOINT2="path"
# Check if first drive is mounted or not
MOUNTSTATUS1=$(df -h | grep "${LOCALMOUNTPOINT1}")
if [ -z "${MOUNTSTATUS1}" ]
then
# If not, mount locally
rclone mount ${RCLONEOPTIONS} ${RCLONEDRIVE1}/ ${LOCALMOUNTPOINT1}/
fi
# Check if second drive is mounted or not
MOUNTSTATUS2=$(df -h | grep "${LOCALMOUNTPOINT2}")
if [ -z "${MOUNTSTATUS2}" ]
then
# If not, mount locally
rclone mount ${RCLONEOPTIONS} ${RCLONEDRIVE2}/ ${LOCALMOUNTPOINT2}/
fi
#