ansible/roles/music/templates/mpd.service
polyfloyd 7cd44bbe53
Some checks failed
Test / build (push) Failing after 53s
music: Add MPD
2025-05-14 21:26:36 +02:00

21 lines
548 B
Desktop File

# {{ ansible_managed }}
[Unit]
Description=Music Player Daemon
After=network.target
[Service]
Type=simple
ExecStartPre=/bin/mkdir -p /run/mpd
ExecStartPre=/bin/chown -R mpd:nogroup /run/mpd
ExecStartPre=/bin/touch /var/log/mpd.log
ExecStartPre=/bin/chown mpd:nogroup /var/log/mpd.log
ExecStartPre=/usr/bin/cp /var/lib/mpd/state.default /var/lib/mpd/state
ExecStart=/usr/bin/mpd --no-daemon /etc/mpd.conf
# MDP will fork itself to the user defined in its config
User=root
LimitMEMLOCK=infinity
LimitRTPRIO=99
[Install]
WantedBy=multi-user.target