Rclone Mount Service not working?

Here is the start up script that I have enabled… I’m wondering why it isn’t working…

# Rclone mount on boot ( service file template - add aditional rclone parameter$
# Copy file to: /etc/systemd/system
# Set remote name (current acdcrypt), path to mount and User,Group (current ple$
# Register new service by typing:
# sudo systemctl daemon-reload
# sudo systemctl enable rclone-mount.service
# systemctl start rclone-mount.service
# systemctl enable NetworkManager-wait-online.service
# Usage:
# To unmount drive use
# systemctl stop rclone-mount.service
# To mount use:
# systemctl start rclone-mount.service

[Unit]
Description=rclone FTP FUSE mount
Documentation=http://rclone.org/docs/
After=systemd-networkd-wait-online.service
Requires=systemd-networkd-wait-online.service

[Service]
Type=simple
User=zcleaver
Group=zcleaver
ExecStart=/usr/bin/rclone mount oldseed:files/sync /opt/drive1/sync
ExecStop=/usr/bin/fusermount -uz /path/

[Install]
Wants=network-online.target

my manual command works-
rclone mount oldseed:files/sync /opt/drive1/sync

as well as starting the service once i’m SSH’d in.

What’s the error message you get when you run the service?

systemctl status rclone-mount.service

No error at all, but i currently have it running because I started it when it didn’t work on boot.

Did you enable it at boot?

systemctl enable rclone-mount.service

Yes - I have it enabled at boot via the
systemctl enable rclone-mount.service
command.

I will reboot and report error if there is one given! :slight_smile:

● rclone-mount.service - rclone FTP FUSE mount
   Loaded: loaded (/etc/systemd/system/rclone-mount.service; static; vendor pres
   Active: inactive (dead)
     Docs: http://rclone.org/docs/

On reboot after calling the status-

What’s this mean?

I’d think it’s because your conditions are wrong:

After=systemd-networkd-wait-online.service
Requires=systemd-networkd-wait-online.service

Should probably be:

After=networkd-wait-online.service
Requires=networkd-wait-online.service

Assuming you have already enabled that as well.

systemctl enable networkd-wait-online.service

I get this error on trying to enable that service…
Failed to enable unit: Unit file networkd-wait-online.service does not exist.

So you’d have to remove those lines from your systemd file.

What do you mean?

I need it to wait until the network is online before it tries to connect.

I mean delete these two lines from your file:

After=systemd-networkd-wait-online.service
Requires=systemd-networkd-wait-online.service

if you don’t have the service installed.

How do I enable the service? I need it to be online to run my rclone mount.

What operating system are you using?

Ubuntu server 18 :slight_smile: <3

And what is the exact output when you type as root:

systemctl enable systemd-networkd-wait-online.service

no output… seems to work…?

I don’t know as you aren’t sharing the full command/output.

root@gemini:~ systemctl enable systemd-networkd-wait-online.service
Created symlink /etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service → /lib/systemd/system/systemd-networkd-wait-online.service.
root@gemini:~

Here is the output, unless im reading this wrong?
root@ubuntu:~# systemctl enable systemd-networkd-wait-online.service
root@ubuntu:~#

Thanks, to validate as I’m sure it’s enabled, but you can test real quick with disabling and re-enabling it:

 systemctl disable systemd-networkd-wait-online.service
 systemctl enable systemd-networkd-wait-online.service
root@ubuntu:~# systemctl enable systemd-networkd-wait-online.service
Created symlink /etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service → /lib/systemd/system/systemd-networkd-wait-online.service.
root@ubuntu:~# 

running a reboot right now.