What is the problem you are having with rclone?
i am just trying to setup rclone mount command as systemd service so that it executes on every boot and i dont have to do it manaully
i used the service file template from here - https://github.com/animosity22/homescripts/blob/master/systemd/rclone.service
sudo nano /etc/systemd/system/rclone.service is having the following content
[Unit]
Description=RClone Service
Wants=network-online.target
After=network-online.target
[Service]
Type=notify
Environment=RCLONE_CONFIG=/opt/rclone/rclone.conf
KillMode=none
RestartSec=5
ExecStart=/usr/bin/rclone mount test: /GD \
--allow-other \
--dir-cache-time 1000h \
--log-level INFO \
--log-file /opt/rclone/logs/rclone.log \
--poll-interval 15s \
--umask 002 \
--rc \
--rc-addr :5572 \
--rc-no-auth \
--cache-dir=/cache \
--vfs-cache-mode full
ExecStop=/bin/fusermount -uz /GD
ExecStartPost=/usr/bin/rclone rc vfs/refresh recursive=true --rc-addr 127.0.0.1:5572 _async=true
Restart=on-failure
User=xd003
Group=xd003
[Install]
WantedBy=multi-user.target
Running sudo systemctl start rclone.service
returns the following :
Job for rclone.service failed because the control process exited with error code.
See "systemctl status rclone.service" and "journalctl -xe" for details.
❯ systemctl status rclone.service
● rclone.service - RClone Service
Loaded: loaded (/etc/systemd/system/rclone.service; disabled; vendor preset: disabled)
Active: activating (auto-restart) (Result: exit-code) since Fri 2020-09-25 18:21:43 IST; 3s ago
Process: 23570 ExecStart=/usr/bin/rclone mount test: /GD --allow-other --dir-cache-time 1000h \ (code=exited, status=1/FAILURE)
Main PID: 23570 (code=exited, status=1/FAILURE)
Sep 25 18:21:43 localhost systemd[1]: rclone.service: Main process exited, code=exited, status=1/FAILURE
Sep 25 18:21:43 localhost systemd[1]: rclone.service: Failed with result 'exit-code'.
Sep 25 18:21:43 localhost systemd[1]: Failed to start RClone Service.
❯ journalctl -xe
Sep 25 18:22:46 localhost rclone[23660]: --vfs-case-insensitive If a file name not found, find a case insensitive match.
Sep 25 18:22:46 localhost rclone[23660]: --vfs-read-ahead SizeSuffix Extra read ahead over --buffer-size when using cache-mode full.
Sep 25 18:22:46 localhost rclone[23660]: --vfs-read-chunk-size SizeSuffix Read the source objects in chunks. (default 128M)
Sep 25 18:22:46 localhost rclone[23660]: --vfs-read-chunk-size-limit SizeSuffix If greater than --vfs-read-chunk-size, double the chunk size after each chunk re>
Sep 25 18:22:46 localhost rclone[23660]: --vfs-read-wait duration Time to wait for in-sequence read before seeking. (default 20ms)
Sep 25 18:22:46 localhost rclone[23660]: --vfs-write-back duration Time to writeback files after last use when using cache. (default 5s)
Sep 25 18:22:46 localhost rclone[23660]: --vfs-write-wait duration Time to wait for in-sequence write before giving error. (default 1s)
Sep 25 18:22:46 localhost rclone[23660]: --volname string Set the volume name (not supported by all OSes).
Sep 25 18:22:46 localhost rclone[23660]: --write-back-cache Makes kernel buffer writes before sending them to rclone. Without this, writethr>
Sep 25 18:22:46 localhost rclone[23660]: Use "rclone [command] --help" for more information about a command.
Sep 25 18:22:46 localhost rclone[23660]: Use "rclone help flags" for to see the global flags.
Sep 25 18:22:46 localhost rclone[23660]: Use "rclone help backends" for a list of supported services.
Sep 25 18:22:46 localhost rclone[23660]: Command mount needs 2 arguments maximum: you provided 3 non flag arguments: ["test:" "/GD" "\\"]
Sep 25 18:22:46 localhost systemd[1]: rclone.service: Main process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ An ExecStart= process belonging to unit rclone.service has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 1.
Sep 25 18:22:46 localhost systemd[1]: rclone.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ The unit rclone.service has entered the 'failed' state with result 'exit-code'.
Sep 25 18:22:46 localhost systemd[1]: Failed to start RClone Service.
░░ Subject: A start job for unit rclone.service has failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ A start job for unit rclone.service has finished with a failure.
░░
░░ The job identifier is 224172 and the job result is failed.
Sep 25 18:22:46 localhost audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=rclone comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? a>
Sep 25 18:22:46 localhost kernel: audit: type=1130 audit(1601038366.094:8620): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=rclone comm="systemd" exe="/usr/lib/>
lines 1628-1664/1664 (END)
What is your rclone version (output from rclone version
)
rclone v1.53.1
- os/arch: linux/amd64 ( Arch Linux )
- go version: go1.15.2
The rclone config contents with secrets removed.
[test]
type = drive
client_id = ****.googleusercontent.com
client_secret = ****
scope = drive
token = {"access_token":"****","token_type":"Bearer","refresh_token":"****","expiry":"2020-09-23T13:59:54.707321057+05:30"}
team_drive = ****
root_folder_id =
Interestingly if i run sudo rclone mount test: /GD --allow-other --dir-cache-time 1000h --log-level INFO --log-file /opt/rclone/logs/rclone.log --poll-interval 15s --umask 002 --rc --rc-addr :5572 --rc-no-auth --vfs-cache-mode full
directly in terminal ,it works well . i guess something is wrong with my rclone.service , probably someone can help me fix it