mpd: update to 0.21.20

Updated patches to latest patchset and removed upstreamed ones.

Ran init script through shellcheck. Restart using SIGHUP.

Added logging from stderr as any kind of logging is missing in --no-daemon
mode.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2020-02-17 20:09:53 -08:00
parent aefc9143e0
commit 3be4778840
8 changed files with 113 additions and 65 deletions
+12 -7
View File
@@ -12,19 +12,24 @@ NICEPRIO=-10
#TODO: Add uci config - nice, config
start_service() {
#create mpd directories from config
local pld=`grep ^playlist_directory "$CONFIGFILE" | cut -d "\"" -f 2 | sed "s/~/\/root/g"`
if [ ! -d $pld ]; then
mkdir -m 0755 -p $pld
fi
local pld lport
local lport=`grep ^port "$CONFIGFILE" | cut -d "\"" -f 2`
[ -z $lport ] && lport=6600
#create mpd directories from config
pld=$(grep ^playlist_directory "$CONFIGFILE" | cut -d "\"" -f 2 | sed "s/~/\/root/g")
[ -d "$pld" ] || mkdir -m 0755 -p "$pld"
lport=$(grep ^port "$CONFIGFILE" | cut -d "\"" -f 2)
[ -z "$lport" ] && lport=6600
procd_open_instance
procd_add_mdns "mpd" "tcp" "$lport"
procd_set_param command "$PROG" --no-daemon "$CONFIGFILE"
procd_set_param stderr 1
# Give MPD some real-time priority
procd_set_param nice "$NICEPRIO"
procd_close_instance
}
reload_service() {
procd_send_signal "$PROG"
}