System level rclone mounts
Example for mounting cloud drives at boot using rclone
Google drive
Section titled “Google drive”/etc/systemd/system/cloud-google.mount
[Unit]Description=Mount for /cloud/google[Mount]Type=rcloneWhat=google:Where=/cloud/googleOptions=rw,_netdev,allow_other,args2env,vfs-cache-mode=full,vfs-cache-max-size=10G,vfs-cache-max-age=24h,dir-cache-time=1000h,attr-timeout=1000h,vfs-read-ahead=256M,poll-interval=15s,config=/home/cyroth/.config/rclone/rclone.conf,cache-dir=/var/rclone[Install]WantedBy=multi-user.targetOnedrive
Section titled “Onedrive”/etc/systemd/system/cloud-onedrive.mount
[Unit]Description=Mount for /cloud/onedrive[Mount]Type=rcloneWhat=onedrive:Where=/cloud/onedriveOptions=rw,_netdev,allow_other,args2env,vfs-cache-mode=full,vfs-cache-max-size=10G,vfs-cache-max-age=24h,dir-cache-time=1000h,attr-timeout=1000h,vfs-read-ahead=256M,poll-interval=15s,config=/home/cyroth/.config/rclone/rclone.conf,cache-dir=/var/rclone[Install]WantedBy=multi-user.targetMount with
systemctl daemon-reload
systemctl enable cloud-onedrive.mount --now
May need to symlink rclone ro /sbin/mount.rclone
ln -s /usr/bin/rclone /sbin/mount.rclone
To make automount
Section titled “To make automount”Create /etc/systemd/system/cloud-google.automount
[Unit]Description=Automount for /cloud/google
[Automount]Where=/cloud/google
[Install]WantedBy=multi-user.targetsudo systemctl stop cloud-google.mountsudo systemctl disable cloud-google.mountsudo systemctl daemon-reloadsudo systemctl enable --now cloud-google.automount