#!/bin/sh

# Terminate already running mpd instance
mpd --kill 1>/dev/null 2>&1

# OPTION 1:
# Set real-time scheduling and relaunch
# Not POSIX compatible, but ash support this ulimit syntax
# ulimit -HS -r 40 && exec mpd --no-daemon

# OPTION 2:
# Launch normally (realtime privilege is set in /etc/security/limits.conf)
exec mpd --no-daemon
