mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
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>
(cherry picked from commit 3be4778840)
This commit is contained in:
@@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user