Start duniter.service daemon with admin or with main user?

This is my service file:

[Unit]
Description=Duniter node
After=network.target
ConditionPathExists=/home/folatt/.config/duniter/duniter_default/duniter.db

[Service]
Type=forking
ExecStart=/usr/bin/duniter webstart
ExecReload=/usr/bin/duniter webrestart
ExecStop=/usr/bin/duniter stop
Restart=on-failure

[Install]
WantedBy=multi-user.target

Disregarding the username in ConditionPathExists, what would do use for these kinds of services?
Yunohost does not create UNIX users as far as I know, only ldap ones, so I would have to create one manually.
So I would think admin is better to use than creating a new user or am I missing something?

Is that a problem with the Duniter yunohost package ?
Or are you trying to update the package ?

Some context would be great.

The duniter yunohost package does not have a daemon, so I have manually created one on my Yunohost + Duniter Pi3 server.

I am replacing my Pi3 with a LIME2 have installed and I’m now wondering if adding a unix user is actually necessary, since I could probably also just run it as admin.
Duniter should not be run as root.

[update]

I found a official duniter.service file from duniter, that I haven’t seen before on my LIME2 and wasn’t on my Pi3, using user duniter, so I guess that answers the question.
The only problem is that my systemd is still broken.

The deb package, installed by the ynh package has a systemd service.
If there’s any issue with this ynh package, it would be great to try to fix it and allow all the users to get it.

There’s no issue with the ynh package. I have an issue with systemd itself.

This issue I have is below:

Well well…

Actually I have the same “issue” on my VM and probably also on my server. Even on my desktop debian.

Why are you trying to run a service for an user instead than a classic service for the system !?

I just tried the package (quickly !), I have a service duniter, and this service seems to work perfectly.
But yet, if I try your “issue”, I have the same problem than you.

So… Duniter is packaged for YunoHost, the package seems to work.
If it doesn’t work for you, you can ask for some help.

But if you’re trying to work without YunoHost, why are you asking here for help !?

I’m not trying to without Yunohost.
Duniter doesn’t start at startup on Yunohost, that’s all.

And I didn’t know that one could run a system service as user.
I assumed that running system services was for root only.

Looks I can circumvent the whole issue by:

admin@Gildurklaus:~$ sudo cp /opt/duniter/release/extra/systemd/duniter.service /lib/systemd/system
admin@Gildurklaus:~$ sudo systemctl enable duniter.service
Created symlink from /etc/systemd/system/multi-user.target.wants/duniter.service to /lib/systemd/system/duniter.service.
admin@Gildurklaus:~$ sudo reboot

So ! It’s an issue with the package duniter then !
But, actually, it isn’t an issue since the service is just not enable in the deb package.
If you need that service running at startup, open an issue on the duniter_ynh repo to ask for it.

Or, you can try a crazy idea, (Even if I’m not sure I would even dare to do so myself), explain clearly your problem at the beginning…

1 Like

The issue already exists.
My apologies for not explaining the problem clearly.