What is the problem you are having with rclone?
I have created a rclone shell script to mount my google drive and it works perfectly, however when I set it up and run it with systemctl it does not work. It says mounted, but when I click on the mounted file it says endpoint is missing
Run the command 'rclone version' and share the full output of the command.
rclone v1.67.0
- os/version: endeavouros (64 bit)
- os/kernel: 6.10.1-arch1-1 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.22.4
- go/linking: static
- go/tags: none
Which cloud storage system are you using? (eg Google Drive)
Google Drive
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
/home/ivan/scripts/RscloneGdrive.sh
#!/bin/bash
/usr/bin/rclone mount gdrive: /home/ivan/Google\ Drive/ --daemon --config /home/ivan/.config/rclone/rclone.conf --allow-non-empty --log-level DEBUG --log-file /tmp/rclone.log
then in /etc/systemd/system/Gdrive.service
[Unit]
Description=Rclone Google Drive Mount
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=ivan
Group=ivan
ExecStart=/home/ivan/scripts/RcloneGdrive.sh
Restart=on-failure
RestartSec=30
[Install]
WantedBy=multi-user.target
Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.
[gdrive]
type = drive
scope = drive
token = XXX
team_drive =
A log from the command that you were trying to run with the -vv
flag
2024/07/27 16:27:31 DEBUG : rclone: Version "v1.67.0" starting with parameters ["/usr/bin/rclone" "mount" "gdrive:" "/home/ivan/Google Drive/" "--daemon" "--config" "/home/ivan/.config/rclone/rclone.conf" "--allow-non-empty" "--log-level" "DEBUG" "--log-file" "/tmp/rclone.log"]
2024/07/27 16:27:31 DEBUG : Creating backend with remote "gdrive:"
2024/07/27 16:27:31 DEBUG : Using config file from "/home/ivan/.config/rclone/rclone.conf"
2024/07/27 16:27:31 DEBUG : gdrive: Loaded invalid token from config file - ignoring
2024/07/27 16:27:31 DEBUG : Saving config "token" in section "gdrive" of the config file
2024/07/27 16:27:31 DEBUG : gdrive: Saved new token in config file
2024/07/27 16:27:31 DEBUG : Google drive root '': 'root_folder_id = REDACTED - save this in the config to speed up startup
2024/07/27 16:27:31 DEBUG : rclone: Version "v1.67.0" starting with parameters ["/usr/bin/rclone" "mount" "gdrive:" "/home/ivan/Google Drive/" "--daemon" "--config" "/home/ivan/.config/rclone/rclone.conf" "--allow-non-empty" "--log-level" "DEBUG" "--log-file" "/tmp/rclone.log"]
2024/07/27 16:27:31 DEBUG : Creating backend with remote "gdrive:"
2024/07/27 16:27:31 DEBUG : Using config file from "/home/ivan/.config/rclone/rclone.conf"
2024/07/27 16:27:32 DEBUG : Google drive root '': 'root_folder_id = REDACTED - save this in the config to speed up startup
2024/07/27 16:27:32 DEBUG : Google drive root '': Mounting on "/home/ivan/Google Drive/"
2024/07/27 16:27:32 DEBUG : : Root:
2024/07/27 16:27:32 DEBUG : : >Root: node=/, err=<nil>
2024/07/27 16:27:32 DEBUG : /: Lookup: name=".Trash"
2024/07/27 16:27:32 DEBUG : rclone: Version "v1.67.0" finishing with parameters ["/usr/bin/rclone" "mount" "gdrive:" "/home/ivan/Google Drive/" "--daemon" "--config" "/home/ivan/.config/rclone/rclone.conf" "--allow-non-empty" "--log-level" "DEBUG" "--log-file" "/tmp/rclone.log"]
2024/07/27 16:27:32 INFO : Signal received: terminated
2024/07/27 16:27:32 ERROR : /home/ivan/Google Drive/: Failed to unmount: exit status 1: fusermount3: failed to unmount /home/ivan/Google Drive: Device or resource busy
2024/07/27 16:27:32 INFO : Exiting...
I've done systemctl daemon-reload
and systemctl start GDrive.service
, but nothing works. I've unmounted before running these two command and I have also restarted the entire PC. The only solution I've seen that works is putting the script into /etc/profile.d, but I've read it's not a good solution because running su will run the script again or smth like that?
P.S. new to linux