You are not logged in.

#51 2014-07-12 02:29:29

runical
Member
From: The Netherlands
Registered: 2012-03-03
Posts: 896

Re: [SOLVED]Can't start mpd

emeres wrote:

Should /run/mpd be deleted on the next boot or for whatever reason, you will have the same problem. Under [Service] section in /etc/systemd/system/mpd.service you can add:

User=mpd

That would run the service as mpd user. Other route could be using tmpfiles pointing to that directory with appropriate settings.

Now that your mpd is running, I recommend disabling mpd.service and enabling/starting mpd.socket. The service will be started when the mpd client tries to connect to mpd at the specified port.

I think this is better solved in this case by editing mpd.conf, as mpd will change to the user in this config.

Mugi wrote:

Thanks alot for all the answeres, hope this will help people in the future with the same problem (will be marked as [SOLVED])

No problem. Glad we could help.

Offline

#52 2014-07-12 17:45:11

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [SOLVED]Can't start mpd

@runical Both approaches need privileges in this case, unless mpd will not be run globally. Still, systemd gives the user far more options and flexibility. However compared to tmpfiles workaround it is probably better to use mpds configuration, good point. And since the scenario you describe will probably occur, one would have to avoid setting user in mpd.conf. Another good point.

Offline

Board footer

Powered by FluxBB