Start rclone service at boot in Matrix

Hello,

I have some 9.4-Matrix (Amlogic-ng.arm) devices and can not start rclone mount at boot.

In 9.2.8 (Amlogic.arm) this work for me:

# cat /storage/.config/system.d/rclone.service -> https://paste.debian.net/1253380/
chmod 777 /storage/.config/system.d/rclone.service
systemctl daemon-reload
systemctl enable rclone.service
systemctl start rclone.service

If I execute this in the Matrix device, it mount, but after reboot it doesn’t mount automatically.

I am missing something?

I will appreciate your help.

Kind regards.

Check what service tells.

systemctl status rclone.service -l --no-pager

Thanks vpeter,

I see this in your command:

Failed to create file system for "RClone:": failed to make remote "RClone:" to wrap: couldn't find root directory ID: Get "https://www.googleapis.com/drive/v3/files/root?alt=json&fields=id&prettyPrint=false&supportsAllDrives=true": x509: certificate has expired or is not yet valid: current time 2021-08-06T16:43:22+02:00 is before 2022-08-22T08:24:39Z

It looks like the device date is not correct in the boot time, now it is ok:

# date 
Sat Sep 10 20:46:49 CEST 2022

Maybe the service script need to wait to NTP client before execute? How could I manage this?

I will appreciate your help.

Best regards.

Try with

After=network-online.service time-sync.target

Thanks!

It is working now!

Best regards.

1 Like

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