You are not logged in.

#1 2022-09-10 11:05

5k18a
Member
Registered: 2022-09-10
Posts: 3

Onedrive as a service how to run it on system load?

I'm trying to run onedrive as a service. I install it through apt install onedrive and everything seems to be ok but the service is inactive after reboot. I was trying to run this service on system load automatically but I failed...

I run it with this commands:
systemctl --user enable onedrive
systemctl --user start onedrive

Any one know how to do it?

systemctl status --user onedrive:

onedrive.service - OneDrive Free Client
     Loaded: loaded (/usr/lib/systemd/user/onedrive.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Thu 2022-09-08 11:02:22 CEST; 5min ago
       Docs: h t t p s : //github.com/abraunegg/onedrive [edited for this post]
    Process: 933 ExecStart=/usr/bin/onedrive --monitor (code=exited, status=3)
   Main PID: 933 (code=exited, status=3)
        CPU: 50ms


onedrive.service:

[Unit]
Description=OneDrive Free Client
Documentation=h t t p s : //github.com/abraunegg/onedrive [edited for this post]
After=network-online.target
Wants=network-online.target

[Service]
ExecStart=/usr/bin/onedrive --monitor
Restart=on-failure
RestartSec=3
RestartPreventExitStatus=3

[Install]
WantedBy=default.target

Offline

#2 2022-09-11 06:24

tlmiller76
Member
From: AZ, USA
Registered: 2016-11-29
Posts: 447

Re: Onedrive as a service how to run it on system load?

To test I installed it, looks like the version in Bullseye is simply too old to work.

WARNING: Your onedrive client version is obsolete and unsupported. Please upgrade your client version.


Q4OS Trinity machine -Dere v14s.  Intel Celeron N5095, 16GB LPDDR4, 512 GB SSD, Intel Jasper Lake GT1, Garbagetek 8822CE Wifi 5 + BT 5.0

Offline

#3 2022-09-11 08:01

5k18a
Member
Registered: 2022-09-10
Posts: 3

Re: Onedrive as a service how to run it on system load?

It could be the reason, but when I run it manually the service works fine until next reboot and I have to run it again.
I tried to add startup script (startup.desktop) but the starting commands doesn't work
systemctl --user enable onedrive
systemctl --user start onedrive

only onedrive --monitor is running from the startup script, and again I have to enter systemctl commands manually. Is there a way to run them on a system startup?

Offline

#4 2022-09-13 20:48

abraunegg
Member
Registered: 2022-09-13
Posts: 1

Re: Onedrive as a service how to run it on system load?

Any one know how to do it?

Please follow the correct process for authenticating and starting the client via systemd is as follows:

  • Install the client correctly

  • Authorise the client correctly

  • Validate your client configuration

  • Test your client configuration

  • Enable systemd service as required

The reason why the service is not starting up is that most likely the client has not been authorised correctly.

To debug further, enable system logging (logging to a log file) and increase the verbosity of the client when running, by modifying the systemd scripts to include --verbose

If you still cant get this to work correctly, raise a discussion on GitHub for support.

I'm trying to run onedrive as a service. I install it through apt install onedrive and everything seems to be ok but the service is inactive after reboot.

To test I installed it, looks like the version in Bullseye is simply too old to work.

Do not install the client from the default Debian repositories. It contains out-of-date client software that contains bugs which have been fixed, thus is obsolete and unsupported - this is why you get this message.

You must install the client the correct way on Debian and Ubuntu platforms following the explicit instructions within ubuntu-package-install.md as per the GitHub repository.

Offline

#5 2022-09-30 17:59

5k18a
Member
Registered: 2022-09-10
Posts: 3

Re: Onedrive as a service how to run it on system load?

Ok I resolved it in a different way. I couldn't win with OneDrive and I installed Insync which is IMHO the easiest solution.

Offline

Board footer

Powered by FluxBB