CommandLine: add option --systemd

This way, MPD can reliably detect whether it was started as systemd
service, which is better than checking sd_booted(), which only checks
whether systemd manages all services, but still MPD could be started
manually.
This commit is contained in:
Max Kellermann
2021-11-05 08:48:19 +01:00
parent be3eca39e8
commit ce77b148d9
4 changed files with 20 additions and 2 deletions

View File

@@ -5,7 +5,7 @@ After=network.target sound.target
[Service]
Type=notify
ExecStart=@prefix@/bin/mpd --no-daemon
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).