[Pkg-mpd-maintainers] Bug#526420: Do you want to support multiple instance of mpd?

Christian Wicke christian at nimkannon.de
Tue Mar 4 22:26:39 UTC 2014


Hello Florian,

I'm also for doing it simple if it possible. I was a bit reluctant to 
manipulate init-skripts manually because then I'm out of the package 
control. I have to remove the files manually if I purge the packet and I 
have to upgrade them manually with each new release. But if we describe 
it in the README.Debian it should be ok. And if only few people ask for 
it, maybe this is the best solution.

I have to admit, I don't know much about how to write systemd units. You 
are probably right that we would have to have one for each daemon. In 
the end we would have to privide a tool to manage mpd instances like kvm 
manages kvm instances.

So let's extend the README.Debian for now. Here is a draft for extra 
paragraphs (but without systemd yet):
If you want to set up additional instances of mpd as a system service, 
create a /etc/mpd-<instancename>.conf as a copy from your /etc/mpd.conf 
for each instance. Make sure that each instance has a different 
pid_file, state_file and port. Probably you want to specify a different 
audio_output for each, too.
For sysV-support you need a /etc/init.d/mpd-<instancename> as a copy 
from /etc/init.d/mpd for each instance. In it, you have to change 
MPDCONF=/etc/mpd.conf to point at your instance config file: 
MPDCONF=/etc/mpd-<instancename>.conf. Finally run "update-rc.d 
mpd-<instancename> defaults". You might have to recreate the 
init.d-scripts when you upgrade to a new version as they will not be 
upgraded.

Christian

Am 02.03.2014 23:39, schrieb Florian Schlichting:
<...>
> thanks for drawing my attention to that bug; I hadn't actually looked at
> the patch before.
>
> My current feeling is that it looks like a fairly complicated solution
> for what I think is a rare problem (but I might be wrong there); do we
> really need to add explicit support for this? Wouldn't it be a perfectly
> ok solution if people who need 5 instances of mpd and thus create 5
> slightly modified versions of mpd.conf also use 5 mpd init scripts, each
> with a different hard-coded value of MPDCONF?
>
> The other concern I have is that we also need to support equivalent
> functionality for systemd. It's easy for an admin to make 5 different
> copies of the systemd unit file mpd ships, but I'm not sure if it's
> possible to start a variable amount of daemons from a single systemd
> unit.
>
> But I like your README.Debian documentation. What if we extend that with
> the recommendation to also create multiple adapted versions of the init
> script / systemd unit, one for each mpd.conf?
>
> Florian
>



More information about the Pkg-mpd-maintainers mailing list