Automount with rclone



I use rclone on my linux-system to mount my google-drive.

What I would like to have is a way to automount a directory the way I do it with some remote directory I access via sshfs. For these I use autofs that mounts the directories only when I access them.

So my question is: Is there a way to use autofs (or something else) so that I can get rclone mount my google drive whenever I cd into the mount-point?

Many thanks!


I suspect you can setup rclone mount with autofs.

There is a mount helper script which might help here.

It would be nice to make an autofs executable mapper which could mount any rclone backend. I’ve been meaning to do that for ages but haven’t!