Allow readiness check to use custom ports

This commit is contained in:
TheSpad
2023-06-06 14:47:27 +01:00
parent 04186475f3
commit b04ca5cd39
3 changed files with 7 additions and 3 deletions

View File

@@ -52,7 +52,8 @@ RUN \
libmono-system4.0-cil \
mono-runtime \
mono-vbnc \
mediainfo && \
mediainfo \
xmlstarlet && \
echo "**** install sonarr ****" && \
mkdir -p /app/sonarr/bin && \
if [ -z ${SONARR_VERSION+x} ]; then \

View File

@@ -52,7 +52,8 @@ RUN \
libmono-system4.0-cil \
mono-runtime \
mono-vbnc \
mediainfo && \
mediainfo \
xmlstarlet && \
echo "**** install sonarr ****" && \
mkdir -p /app/sonarr/bin && \
if [ -z ${SONARR_VERSION+x} ]; then \

View File

@@ -1,6 +1,8 @@
#!/bin/bash
if [[ $(curl -sL "http://localhost:8989/ping" | jq -r '.status' 2>/dev/null) = "OK" ]]; then
PORT=$(xmlstarlet sel -T -t -v /Config/Port /config/config.xml)
if [[ $(curl -sL "http://localhost:${PORT:-8989}/ping" | jq -r '.status' 2>/dev/null) = "OK" ]]; then
exit 0
else
exit 1