3 echo "==> Create a configuration file /etc/mpd.conf before using MPD (example: /usr/share/mpd/mpd.conf.example)"
7 getent group "mpd" &>/dev/null || groupadd -r -g 45 mpd 1>/dev/null
8 getent passwd "mpd" &>/dev/null || useradd -r -u 45 -g mpd -d "/var/lib/mpd" -s "/bin/true" -G "audio" mpd 1>/dev/null
9 for dir in /var/{lib,log,run}/mpd; do
10 chown -R mpd:mpd "$dir" 1>/dev/null
15 getent passwd "mpd" &>/dev/null && userdel mpd 1>/dev/null
16 getent group "mpd" &>/dev/null && groupdel mpd 1>/dev/null
17 [ -f etc/mpd.conf ] && mv etc/mpd.conf etc/mpd.conf.pacsave 1>/dev/null