forked from mirrors/nixpkgs
mpd: fix socket activation
Apparently since systemd v250 a `ListenStream` in an override file won't override the unit, but will be appended to a list of socket addresses. The socket unit fails if two or more addresses have the same port, probably because two systemd processes try to listen to it at once. The solution is to add an empty `ListenStream=` to reset all previous definitions. Fix #175478.
This commit is contained in:
parent
6bd5219cc1
commit
7149c5cb60
|
@ -215,6 +215,7 @@ in {
|
|||
systemd.sockets.mpd = mkIf cfg.startWhenNeeded {
|
||||
wantedBy = [ "sockets.target" ];
|
||||
listenStreams = [
|
||||
"" # Note: this is needed to override the upstream unit
|
||||
(if pkgs.lib.hasPrefix "/" cfg.network.listenAddress
|
||||
then cfg.network.listenAddress
|
||||
else "${optionalString (cfg.network.listenAddress != "any") "${cfg.network.listenAddress}:"}${toString cfg.network.port}")
|
||||
|
|
Loading…
Reference in a new issue