2011-09-30 08:37:36 +02:00
|
|
|
[Unit]
|
|
|
|
Description=Music Player Daemon
|
2015-07-17 19:55:23 +02:00
|
|
|
Documentation=man:mpd(1) man:mpd.conf(5)
|
2012-11-21 17:26:23 +01:00
|
|
|
After=network.target sound.target
|
2011-09-30 08:37:36 +02:00
|
|
|
|
|
|
|
[Service]
|
2016-02-26 16:14:06 +01:00
|
|
|
Type=notify
|
2021-11-05 08:48:19 +01:00
|
|
|
ExecStart=@prefix@/bin/mpd --systemd
|
2011-09-30 08:37:36 +02:00
|
|
|
|
2018-08-02 11:15:35 +02:00
|
|
|
# Enable this setting to ask systemd to watch over MPD, see
|
|
|
|
# systemd.service(5). This is disabled by default because it causes
|
|
|
|
# periodic wakeups which are unnecessary if MPD is not playing.
|
|
|
|
#WatchdogSec=120
|
|
|
|
|
2019-10-09 14:40:02 +02:00
|
|
|
# allow MPD to use real-time priority 40
|
|
|
|
LimitRTPRIO=40
|
2015-12-01 08:53:35 +01:00
|
|
|
LimitRTTIME=infinity
|
2014-02-12 21:00:53 +01:00
|
|
|
|
2020-06-09 21:03:02 +02:00
|
|
|
# for io_uring
|
|
|
|
LimitMEMLOCK=64M
|
|
|
|
|
2022-11-04 00:11:13 +01:00
|
|
|
# Required in order for ProtectSystem= (and other sandboxing) to work
|
|
|
|
PrivateUsers=yes
|
2015-08-11 19:00:21 +02:00
|
|
|
# disallow writing to /usr, /bin, /sbin, ...
|
|
|
|
ProtectSystem=yes
|
|
|
|
|
2016-12-09 10:36:02 +01:00
|
|
|
# more paranoid security settings
|
|
|
|
NoNewPrivileges=yes
|
|
|
|
ProtectKernelTunables=yes
|
|
|
|
ProtectControlGroups=yes
|
|
|
|
# AF_NETLINK is required by libsmbclient, or it will exit() .. *sigh*
|
|
|
|
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX AF_NETLINK
|
|
|
|
RestrictNamespaces=yes
|
|
|
|
|
2016-12-13 08:41:55 +01:00
|
|
|
# Note that "ProtectKernelModules=yes" is missing in the user unit
|
|
|
|
# because systemd 232 is unable to reduce its own capabilities
|
|
|
|
# ("Failed at step CAPABILITIES spawning /usr/bin/mpd: Operation not
|
|
|
|
# permitted")
|
|
|
|
|
2011-09-30 08:37:36 +02:00
|
|
|
[Install]
|
2016-12-13 08:41:55 +01:00
|
|
|
WantedBy=default.target
|