From 9e6ec0f00e83f7bab2303966e1848d0c33b46d48 Mon Sep 17 00:00:00 2001 From: casjay Date: Sat, 10 Sep 2022 15:35:43 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20Committing=20everything?= =?UTF-8?q?=20that=20changed=20=F0=9F=97=83=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/entrypoint-music.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/entrypoint-music.sh b/bin/entrypoint-music.sh index 45ddc20..e7dfdac 100755 --- a/bin/entrypoint-music.sh +++ b/bin/entrypoint-music.sh @@ -48,11 +48,12 @@ __exec_bash() { } # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - __mpd_start() { + pgrep mpd &>/dev/null || mpd /config/mpd/mpd.conf sleep 10 - mpd /config/mpd/mpd.conf - sleep 5 if pgrep mpd &>/dev/null; then - mpc status | grep -q 'playing' || mpc play &>/dev/null + mpc status 2>&1 | grep -q 'playing' || mpc play &>/dev/null + else + echo "MPD seems to have not started" 1>&2 fi } # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -