Skip to content

Commit

Permalink
Merge pull request #249 from linuxserver/master-ffmpeg
Browse files Browse the repository at this point in the history
Check ffmepg path, use proper health endpoint
  • Loading branch information
thespad authored May 18, 2024
2 parents bdc4079 + 1c26852 commit 1488417
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion root/etc/s6-overlay/s6-rc.d/svc-jellyfin/data/check
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 5 additions & 1 deletion root/etc/s6-overlay/s6-rc.d/svc-jellyfin/run
Original file line number Diff line number Diff line change
@@ -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" \
Expand All @@ -11,4 +15,4 @@ export \
exec \
s6-notifyoncheck -d -n 300 -w 1000 \
s6-setuidgid abc /usr/bin/jellyfin \
--ffmpeg=/usr/lib/jellyfin-ffmpeg/ffmpeg
--ffmpeg="${FFMPEG_PATH}"

0 comments on commit 1488417

Please sign in to comment.