onedriveClient icon indicating copy to clipboard operation
onedriveClient copied to clipboard

Systemd Service

Open modelmat opened this issue 6 years ago • 10 comments

Similar to https://github.com/xybu/onedrived-dev/issues/47, is this possible?

modelmat avatar Sep 29 '18 04:09 modelmat

[Unit]
Description=A Microsoft OneDrive client for Linux, written in Python3.
Documentation=https://github.com/derrix060/onedriveClient
Wants=network-online.target
After=network-online.target

[Service]
ExecStart=/usr/bin/onedrived start --debug
ExecStop=/usr/bin/onedrived stop
ExecReload=/usr/bin/onedrived restart

[Install]
WantedBy=multi-user.target

This seems to work for me, is this fine? Also should this be added via the script? Where?

modelmat avatar Oct 04 '18 05:10 modelmat

I will test it tonight.

For sure it needs to be added via script, I'm not sure yet how...

derrix060 avatar Oct 07 '18 18:10 derrix060

According to https://www.freedesktop.org/software/systemd/man/systemd.unit.html, these are the directories it can be in. image I think it's usually /usr/lib/systemd/user/ is for user services, so it should go there (though this needs sudo still). Maybe we should leave it up to the user to install it?

modelmat avatar Oct 09 '18 00:10 modelmat

I would prefer to install on ~/.config/systemd/user/ because you wouldn't require sudo access and it can be installed by user basis.

derrix060 avatar Oct 10 '18 06:10 derrix060

I can see that very well... Okay then, I'll see if I can get that working.

modelmat avatar Oct 10 '18 10:10 modelmat

The AUR package now installs the systemctl script. (https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=onedrive-client-git)

modelmat avatar Jan 08 '19 23:01 modelmat

That's nice. Can you add a stage on the travis CI to prove that it works and no one will break this?

derrix060 avatar Jan 09 '19 01:01 derrix060

I'm not sure how to. AFAIK, unless we change the onedrive-client start and stop commands it should stay the same, so I'm also not sure what you're asking.

modelmat avatar Jan 09 '19 01:01 modelmat

My point is only to validade that the AUR package is installing correct and it works

derrix060 avatar Jan 09 '19 19:01 derrix060

I don't think it's possible to install AUR packages on Travis as it uses an entirely different packaging system. Unless we use something like https://github.com/mikkeloscar/arch-travis, which I have no idea how well it works.

modelmat avatar Jan 10 '19 01:01 modelmat