Revert "systemd: add "RuntimeDirectory" directive"

This reverts commit 552c30eae4.

It has caused various problems; for example, MPD wasn't able to write
the pid_file (which was already mitigated by commit a4e4217204).

And apparently, the socket file created in the same directory by
mpd.socket disappears when mpd.service (re)creates the directory.  I
could not reproduce this problem with 247.3, but maybe this is a bug
in older systemd versions?

Until we figure out why this happens, let's remove the
RuntimeDirectory directive.  A future MPD version may be launched as
regular user, not as root, which will eliminate one major problem with
RuntimeDirectory.
This commit is contained in:
Max Kellermann 2021-11-11 10:12:27 +01:00
parent 3464497880
commit 1112d3907a
3 changed files with 3 additions and 9 deletions

4
NEWS
View File

@ -6,7 +6,9 @@ ver 0.23.4 (not yet released)
* output * output
- alsa: add option "thesycon_dsd_workaround" to work around device bug - alsa: add option "thesycon_dsd_workaround" to work around device bug
* fix crash on debug builds if startup fails * fix crash on debug builds if startup fails
* ignore the "pid_file" setting if started as systemd service * systemd
- remove "RuntimeDirectory" directive because it caused problems
- ignore the "pid_file" setting if started as systemd service
* Windows * Windows
- enable the "openmpt" decoder plugin - enable the "openmpt" decoder plugin

View File

@ -7,10 +7,6 @@ After=network.target sound.target
Type=notify Type=notify
ExecStart=@prefix@/bin/mpd --systemd ExecStart=@prefix@/bin/mpd --systemd
# Create /run/mpd (if MPD is launched without the socket unit and is
# configured to bind listener sockets there).
RuntimeDirectory=mpd
# Enable this setting to ask systemd to watch over MPD, see # Enable this setting to ask systemd to watch over MPD, see
# systemd.service(5). This is disabled by default because it causes # systemd.service(5). This is disabled by default because it causes
# periodic wakeups which are unnecessary if MPD is not playing. # periodic wakeups which are unnecessary if MPD is not playing.

View File

@ -7,10 +7,6 @@ After=network.target sound.target
Type=notify Type=notify
ExecStart=@prefix@/bin/mpd --systemd ExecStart=@prefix@/bin/mpd --systemd
# Create /run/user/$UID/mpd (if MPD is launched without the socket
# unit and is configured to bind listener sockets there).
RuntimeDirectory=mpd
# Enable this setting to ask systemd to watch over MPD, see # Enable this setting to ask systemd to watch over MPD, see
# systemd.service(5). This is disabled by default because it causes # systemd.service(5). This is disabled by default because it causes
# periodic wakeups which are unnecessary if MPD is not playing. # periodic wakeups which are unnecessary if MPD is not playing.