Mount Rclone google drive at startup

i want to find a way of mount a gdrive at startup on ubuntu 18.04
if i restart my machine after updates or to do some hardware maintenance i have to run the mount command after the system is rebooted. i am looking at a way to automate this is have played with a few ideas that i have found online such as adding it to the rc.local script but i can not get this to work and can not find any easy instruction on how to set this up correctly or test if it is working.
i have also tried to play around with a docker container or compose file to try and see if this will work when i restart but still no luck

the command that i am running to mount the drive is
sudo rclone --allow-non-empty --allow-other mount tdrive: /home/media/TDrive/ --size-only --dir-cache-time=2m --vfs-read-chunk-size=64M --vfs-cache-max-age 675h --vfs-read-chunk-size-limit=1G --buffer-size=32M &

thank you in advance

systemd is the way to do this with ubuntu - there is a systemd script on the wiki

We could really do with a better tutorial on the wiki though as that doesn’t mention any of the commands you need to run.

thank you
i will have to take a look at this the wiki does not explain alot so i will have to understand this and then figure out a way to test it from there.

1 Like