mpd.service.in 1.01 KB
Newer Older
1 2
[Unit]
Description=Music Player Daemon
3
Documentation=man:mpd(1) man:mpd.conf(5)
4
After=network.target sound.target
5 6

[Service]
7
Type=notify
8 9
ExecStart=@prefix@/bin/mpd --no-daemon

10 11 12 13 14
# 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

15 16
# allow MPD to use real-time priority 50
LimitRTPRIO=50
17
LimitRTTIME=infinity
18

19 20 21
# disallow writing to /usr, /bin, /sbin, ...
ProtectSystem=yes

22 23 24 25 26 27 28 29
# 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

30 31 32 33 34
# 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")

35
[Install]
36
WantedBy=default.target