Mounting at startup 2 or more drives the same systemd script

What is the problem you are having with rclone?

Do I need to make one script (/etc/systemd/system/xxxxxx.service) for each drive connection? OR ..... is possible to mount more than one drive in the same service file?

If so; could anyone tell the way to do it.
I don't have enough knowledge about the xxxxxx.service files.

It is somewhat tedious to fill out all the requirements every time we ask a question, and even more so in this one when it is not really about the application itself, but about the way of applying or doing some stuff according to the operating system. And now I'm not in my PC, im in my mobile.

Run the command 'rclone version' and share the full output of the command.

Yes

Which cloud storage system are you using? (eg Google Drive)

The command you were trying to run (eg rclone copy /tmp remote:tmp)

[Unit]
Description=mount rclone cloud systemd service.
AssertPathIsDirectory=/home/user/OneDrive/
After=network-online.target

[Service]
Type=simple
User=user
Group=user
ExecStart=/usr/bin/rclone --vfs-cache-mode full mount OneDrive: /home/user/OneDrive/ --config /home/user/.config/rclone/rclone.conf
ExecStop=/bin/fusermount -u /home/user/OneDrive/
Restart=on-failure
RestartSec=10

[Install]
WantedBy=default.target

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

Paste config here

A log from the command that you were trying to run with the -vv flag

Paste  log here

You do not have to. You can create one master service file and invoke it multiple times (example here - Manage multiple service instances with systemctl | Opensource.com) passing extra parameters (remote name, mount point for example). You find on google plenty of examples how to approach it, e.g. Passing Multiple Parameters to a systemd Service | Baeldung on Linux.

And if systemd is too challenging to master then try different approach - maybe utilize rclone combine remote? - Rclone command for Jellyfin - #3 by kapitainsky

Thank you very much. I'll try your suggestions. Let's see what happens.

Cheers :clinking_glasses:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.