Hello,
I’m running into a problem at writing a systemd unit file to mount a remote storage (webdav/Nextcloud) with rclone. Following command in bash is desired and works as expected:
/usr/bin/rclone mount nextcloud:/ $HOME/.mnt/nextcloud --daemon --vfs-cache-mode full
The resulting systemd unit file resides in ~/.config/systemd/user/rclone-mount-nextcloud.service and looks like this:
[Unit]
Description=Mounts a WebDAV directory with rclone
Documentation=man:rclone(1)
[Service]
Type=notify
ExecStart=/usr/bin/rclone mount nextcloud:/ $HOME/.mnt/nextcloud --daemon --vfs-cache-mode full
ExecStop=/usr/bin/fusermount -u $HOME/.mnt/nextcloud
RestartSec=5
[Install]
WantedBy=default.target
When I start this unit with
systemctl --user start rclone-mount-nextcloud.service
rclone exits with exit code 1, leaving in the journal
Command mount needs 2 arguments minimum: you provided 1 non flag arguments: ["nextcloud:/"]
It seems that systemd doesn’t provide rclone with the second argument (and maybe neither with those flags). Does anyone know how to solve that?