From f70926cb0e2f3c921e01e88c04864c88b919cebe Mon Sep 17 00:00:00 2001 From: thespad Date: Sat, 18 May 2024 17:13:40 +0100 Subject: [PATCH 1/3] Check ffmepg path, use proper health endpoint --- root/etc/s6-overlay/s6-rc.d/svc-jellyfin/run | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/root/etc/s6-overlay/s6-rc.d/svc-jellyfin/run b/root/etc/s6-overlay/s6-rc.d/svc-jellyfin/run index b1e90ce3..d227ab94 100755 --- a/root/etc/s6-overlay/s6-rc.d/svc-jellyfin/run +++ b/root/etc/s6-overlay/s6-rc.d/svc-jellyfin/run @@ -1,6 +1,10 @@ #!/usr/bin/with-contenv bash # shellcheck shell=bash +if [[ -z "${FFMPEG_PATH}" ]] || [[ ! -f "${FFMPEG_PATH}" ]]; then + FFMPEG_PATH=/usr/lib/jellyfin-ffmpeg/ffmpeg +fi + export \ JELLYFIN_DATA_DIR="/config/data" \ JELLYFIN_CONFIG_DIR="/config" \ @@ -9,6 +13,6 @@ export \ JELLYFIN_WEB_DIR="/usr/share/jellyfin/web" exec \ - s6-notifyoncheck -d -n 300 -w 1000 \ + s6-notifyoncheck -d -n 300 -w 1000 -c "curl -s --output /dev/null http://localhost:8096/health" \ s6-setuidgid abc /usr/bin/jellyfin \ - --ffmpeg=/usr/lib/jellyfin-ffmpeg/ffmpeg + --ffmpeg="${FFMPEG_PATH}" From 048fd11f093d08c4cdb7f93a926b32427bc7989b Mon Sep 17 00:00:00 2001 From: thespad Date: Sat, 18 May 2024 17:15:41 +0100 Subject: [PATCH 2/3] Oh, it was already using the health endpoint --- root/etc/s6-overlay/s6-rc.d/svc-jellyfin/run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/root/etc/s6-overlay/s6-rc.d/svc-jellyfin/run b/root/etc/s6-overlay/s6-rc.d/svc-jellyfin/run index d227ab94..c9838e55 100755 --- a/root/etc/s6-overlay/s6-rc.d/svc-jellyfin/run +++ b/root/etc/s6-overlay/s6-rc.d/svc-jellyfin/run @@ -13,6 +13,6 @@ export \ JELLYFIN_WEB_DIR="/usr/share/jellyfin/web" exec \ - s6-notifyoncheck -d -n 300 -w 1000 -c "curl -s --output /dev/null http://localhost:8096/health" \ + s6-notifyoncheck -d -n 300 -w 1000 \ s6-setuidgid abc /usr/bin/jellyfin \ --ffmpeg="${FFMPEG_PATH}" From 1c268525638dca31d5d823642d9ad9178651a9ae Mon Sep 17 00:00:00 2001 From: thespad Date: Sat, 18 May 2024 19:36:27 +0100 Subject: [PATCH 3/3] Don't try and read network.xml if it doesn't exist (like on first run) --- root/etc/s6-overlay/s6-rc.d/svc-jellyfin/data/check | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/root/etc/s6-overlay/s6-rc.d/svc-jellyfin/data/check b/root/etc/s6-overlay/s6-rc.d/svc-jellyfin/data/check index 2b7be3e2..fa4205cb 100755 --- a/root/etc/s6-overlay/s6-rc.d/svc-jellyfin/data/check +++ b/root/etc/s6-overlay/s6-rc.d/svc-jellyfin/data/check @@ -1,6 +1,8 @@ #!/bin/bash -PORT=$(xmlstarlet sel -T -t -v /NetworkConfiguration/HttpServerPortNumber /config/network.xml) +if [[ -f "/config/network.xml" ]]; then + PORT=$(xmlstarlet sel -T -t -v /NetworkConfiguration/HttpServerPortNumber /config/network.xml) +fi if [[ $(curl -sL "http://localhost:${PORT:-8096}/health" 2>/dev/null) = "Healthy" ]]; then exit 0