From 7338b16c180a879745ecf6dcd6a7d490081dbb01 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 13 Feb 2012 20:48:51 +0100 Subject: listen: implement systemd socket activation --- doc/user.xml | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'doc') diff --git a/doc/user.xml b/doc/user.xml index d0db21ef..427e561c 100644 --- a/doc/user.xml +++ b/doc/user.xml @@ -99,6 +99,47 @@ cd mpd-version make install + +
+ <filename>systemd</filename> socket activation + + + Using systemd, you can launch + mpd on demand when the first client + attempts to connect. Create two files in + /etc/systemd/system/; first + mpd.socket: + + + [Socket] +ListenStream=/run/mpd.socket +ListenStream=6600 +[Install] +WantedBy=sockets.target + + + Now create mpd.service: + + + [Unit] +Description=Music Player Daemon +After=sound.target +[Service] +ExecStart=/usr/bin/mpd --stdout --no-daemon + + + Start the socket: + + + systemctl enable mpd.socket +systemctl start mpd.socket + + + In this configuration, mpd will ignore + the bind_to_address and + port settings. + +
-- cgit v1.2.3