Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Systemd Service #20

Open
modelmat opened this issue Sep 29, 2018 · 10 comments
Open

Systemd Service #20

modelmat opened this issue Sep 29, 2018 · 10 comments

Comments

@modelmat
Copy link
Collaborator

Similar to xybu#47, is this possible?

@modelmat
Copy link
Collaborator Author

modelmat commented Oct 4, 2018

[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?

@derrix060
Copy link
Owner

I will test it tonight.

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

@modelmat
Copy link
Collaborator Author

modelmat commented Oct 9, 2018

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?

@derrix060
Copy link
Owner

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

@modelmat
Copy link
Collaborator Author

modelmat commented Oct 10, 2018

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

@modelmat
Copy link
Collaborator Author

modelmat commented Jan 8, 2019

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

@derrix060
Copy link
Owner

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

@modelmat
Copy link
Collaborator Author

modelmat commented Jan 9, 2019

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.

@derrix060
Copy link
Owner

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

@modelmat
Copy link
Collaborator Author

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants