#
Install RClone | webally.co.za
By
#
Install RClone
curl https://rclone.org/install.sh | sudo bash
Then when it's done installing, execute the following command:
rclone config
If at this point you can't open a browser because you're in a terminal then don't worry, there is a way around this.
But to let the command run every time the server start, add the command to /etc/rc.d/rc.local
nano /etc/rc.d/rc.local
Add the following command to the end of the file, where one
is the name you have the share in step 2 and /var/one
is where you want your onedrive to mount.
# /etc/rc.d/rc.local
rclone --vfs-cache-mode writes mount one: /var/one
#
Mounting the drive on Startup with systemctl service
nano /etc/systemd/system/rclone.service
Copy and Paste the folowing
[Unit]
Description=OneDrive (rclone)
AssertPathIsDirectory=/var/one
After=network.service
[Service]
Type=simple
ExecStart=/usr/bin/rclone mount \
--config=/root/.config/rclone/rclone.conf \
--allow-other \
--cache-tmp-upload-path=/tmp/rclone/upload \
--cache-chunk-path=/tmp/rclone/chunks \
--cache-workers=8 \
--cache-writes \
--cache-dir=/tmp/rclone/vfs \
--cache-db-path=/tmp/rclone/db \
--no-modtime \
--drive-use-trash \
--stats=0 \
--checkers=16 \
--bwlimit=40M \
--dir-cache-time=60m \
--cache-info-age=60m one:/ /var/one
ExecStop=/bin/fusermount -u /var/one
Restart=always
RestartSec=10
[Install]
WantedBy=default.target
Then run the following command that will run the service and enable
to add it to the startup
systemctl start rclone
systemctl enable rclone