# Anyone have an idiots guide to writing a script to mount drives on boot?

**URL:** <https://forum.rclone.org/t/anyone-have-an-idiots-guide-to-writing-a-script-to-mount-drives-on-boot/842>\
**Category:** Help and Support\
**Created:** [January 23, 2017, 10:37pm UTC](https://forum.rclone.org/t/anyone-have-an-idiots-guide-to-writing-a-script-to-mount-drives-on-boot/842 "2017-01-23T22:37:37Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Ajki](https://forum.rclone.org/user_avatar/forum.rclone.org/ajki/32/44_2.png) [@Ajki](https://forum.rclone.org/u/Ajki)\
**Post date:** [January 25, 2017, 8:24am UTC](https://forum.rclone.org/t/anyone-have-an-idiots-guide-to-writing-a-script-to-mount-drives-on-boot/842/2 "2017-01-25T08:24:26Z")

</div>

Make new service file:  
sudo nano /etc/systemd/system/rclone-mount.service

> [Unit]  
> Description=rclone Amazon Cloud Drive FUSE mount  
> Documentation=[Documentation](http://rclone.org/docs/)  
> After=network-online.target

> [Service]  
> Type=forking  
> User=plex  
> Group=plex  
> ExecStart= rclone mount --allow-non-empty --allow-other --max-read-ahead 200M --checkers 16 acd:/ /storage/.acd/ &  
> ExecStop= fusermount -uz /storage/.acd

> [Install]  
> Wants=network-online.target

Proceed with  
`sudo systemctl daemon-reload`  
`sudo systemctl enable rclone-mount.service`  
`systemctl start rclone-mount.service`

Enable network-online.target ( so rclone does not do mount before internet is present on boot )  
`systemctl enable NetworkManager-wait-online.service`

And thats it, now when you reboot your drive will be automatically mounted.  
You can check if rclone mounted the drive with  
`findmnt | grep rclone`

p.s. Dont forget to change your names for remote and paths for mount.

---

_[View the full topic](https://forum.rclone.org/t/anyone-have-an-idiots-guide-to-writing-a-script-to-mount-drives-on-boot/842)._
