zcleaver
(Zack)
1
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
zcleaver
(Zack)
4
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
zcleaver
(Zack)
6
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!
zcleaver
(Zack)
7
● 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
zcleaver
(Zack)
9
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.
zcleaver
(Zack)
11
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.
zcleaver
(Zack)
13
How do I enable the service? I need it to be online to run my rclone mount.
What operating system are you using?
And what is the exact output when you type as root:
systemctl enable systemd-networkd-wait-online.service
zcleaver
(Zack)
17
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:~
zcleaver
(Zack)
19
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
zcleaver
(Zack)
21
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.