Add MPD service file
This commit is contained in:
parent
472fc43adb
commit
e9f4e1297a
1 changed files with 24 additions and 0 deletions
24
systemd/.config/systemd/user/mpd.service
Normal file
24
systemd/.config/systemd/user/mpd.service
Normal file
|
@ -0,0 +1,24 @@
|
|||
[Unit]
|
||||
Description=Music Player Daemon
|
||||
After=network.target sound.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/mpd --no-daemon
|
||||
ExecStartPre=/usr/bin/mount /mnt/music
|
||||
ExecStopPost=/usr/bin/umount /mnt/music
|
||||
|
||||
# allow MPD to use real-time priority 50
|
||||
LimitRTPRIO=50
|
||||
LimitRTTIME=-1
|
||||
|
||||
# move MPD to a top-level cgroup, as real-time budget assignment fails
|
||||
# in cgroup /system/mpd.service, because /system has a zero real-time
|
||||
# budget; see
|
||||
# http://www.freedesktop.org/wiki/Software/systemd/MyServiceCantGetRealtime/
|
||||
ControlGroup=cpu:/mpd
|
||||
|
||||
# assign a real-time budget
|
||||
ControlGroupAttribute=cpu.rt_runtime_us 500000
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
Loading…
Reference in a new issue