From 93fb4ac22e6bdcb3cc340d3b23df6bf22dcde6fb Mon Sep 17 00:00:00 2001 From: TheSpad Date: Wed, 5 Jul 2023 20:20:17 +0100 Subject: [PATCH] Update readme links and readiness check --- Dockerfile | 3 ++- Dockerfile.aarch64 | 3 ++- Jenkinsfile | 6 +++--- README.md | 4 ++-- readme-vars.yml | 2 +- root/etc/s6-overlay/s6-rc.d/init-jellyfin-config/run | 1 + root/etc/s6-overlay/s6-rc.d/init-jellyfin-video/run | 5 +++-- root/etc/s6-overlay/s6-rc.d/svc-jellyfin/data/check | 9 +++++++++ root/etc/s6-overlay/s6-rc.d/svc-jellyfin/run | 1 + 9 files changed, 24 insertions(+), 10 deletions(-) create mode 100755 root/etc/s6-overlay/s6-rc.d/svc-jellyfin/data/check diff --git a/Dockerfile b/Dockerfile index a2970e7..9c99320 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,7 +29,8 @@ RUN \ libfontconfig1 \ libfreetype6 \ libssl3 \ - mesa-va-drivers && \ + mesa-va-drivers \ + xmlstarlet && \ echo "**** cleanup ****" && \ rm -rf \ /tmp/* \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index cb830dc..9d823f5 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -31,7 +31,8 @@ RUN \ libomxil-bellagio0 \ libomxil-bellagio-bin \ libraspberrypi0 \ - libssl3 && \ + libssl3 \ + xmlstarlet && \ echo "**** cleanup ****" && \ rm -rf \ /tmp/* \ diff --git a/Jenkinsfile b/Jenkinsfile index 4b6b2a6..13ad87d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -480,7 +480,7 @@ pipeline { --label \"org.opencontainers.image.licenses=GPL-3.0-only\" \ --label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \ --label \"org.opencontainers.image.title=Jellyfin\" \ - --label \"org.opencontainers.image.description=[Jellyfin](https://jellyfin.github.io/) is a Free Software Media System that puts you in control of managing and streaming your media. It is an alternative to the proprietary Emby and Plex, to provide media from a dedicated server to end-user devices via multiple apps. Jellyfin is descended from Emby's 3.5.2 release and ported to the .NET Core framework to enable full cross-platform support. There are no strings attached, no premium licenses or features, and no hidden agendas: just a team who want to build something better and work together to achieve it.\" \ + --label \"org.opencontainers.image.description=[Jellyfin](https://github.com/jellyfin/jellyfin) is a Free Software Media System that puts you in control of managing and streaming your media. It is an alternative to the proprietary Emby and Plex, to provide media from a dedicated server to end-user devices via multiple apps. Jellyfin is descended from Emby's 3.5.2 release and ported to the .NET Core framework to enable full cross-platform support. There are no strings attached, no premium licenses or features, and no hidden agendas: just a team who want to build something better and work together to achieve it.\" \ --no-cache --pull -t ${IMAGE}:${META_TAG} --platform=linux/amd64 \ --build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ." } @@ -511,7 +511,7 @@ pipeline { --label \"org.opencontainers.image.licenses=GPL-3.0-only\" \ --label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \ --label \"org.opencontainers.image.title=Jellyfin\" \ - --label \"org.opencontainers.image.description=[Jellyfin](https://jellyfin.github.io/) is a Free Software Media System that puts you in control of managing and streaming your media. It is an alternative to the proprietary Emby and Plex, to provide media from a dedicated server to end-user devices via multiple apps. Jellyfin is descended from Emby's 3.5.2 release and ported to the .NET Core framework to enable full cross-platform support. There are no strings attached, no premium licenses or features, and no hidden agendas: just a team who want to build something better and work together to achieve it.\" \ + --label \"org.opencontainers.image.description=[Jellyfin](https://github.com/jellyfin/jellyfin) is a Free Software Media System that puts you in control of managing and streaming your media. It is an alternative to the proprietary Emby and Plex, to provide media from a dedicated server to end-user devices via multiple apps. Jellyfin is descended from Emby's 3.5.2 release and ported to the .NET Core framework to enable full cross-platform support. There are no strings attached, no premium licenses or features, and no hidden agendas: just a team who want to build something better and work together to achieve it.\" \ --no-cache --pull -t ${IMAGE}:amd64-${META_TAG} --platform=linux/amd64 \ --build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ." } @@ -539,7 +539,7 @@ pipeline { --label \"org.opencontainers.image.licenses=GPL-3.0-only\" \ --label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \ --label \"org.opencontainers.image.title=Jellyfin\" \ - --label \"org.opencontainers.image.description=[Jellyfin](https://jellyfin.github.io/) is a Free Software Media System that puts you in control of managing and streaming your media. It is an alternative to the proprietary Emby and Plex, to provide media from a dedicated server to end-user devices via multiple apps. Jellyfin is descended from Emby's 3.5.2 release and ported to the .NET Core framework to enable full cross-platform support. There are no strings attached, no premium licenses or features, and no hidden agendas: just a team who want to build something better and work together to achieve it.\" \ + --label \"org.opencontainers.image.description=[Jellyfin](https://github.com/jellyfin/jellyfin) is a Free Software Media System that puts you in control of managing and streaming your media. It is an alternative to the proprietary Emby and Plex, to provide media from a dedicated server to end-user devices via multiple apps. Jellyfin is descended from Emby's 3.5.2 release and ported to the .NET Core framework to enable full cross-platform support. There are no strings attached, no premium licenses or features, and no hidden agendas: just a team who want to build something better and work together to achieve it.\" \ --no-cache --pull -f Dockerfile.aarch64 -t ${IMAGE}:arm64v8-${META_TAG} --platform=linux/arm64 \ --build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ." sh "docker tag ${IMAGE}:arm64v8-${META_TAG} ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}" diff --git a/README.md b/README.md index 3432ed0..b8ee0ee 100644 --- a/README.md +++ b/README.md @@ -40,9 +40,9 @@ Find us at: [![Jenkins Build](https://img.shields.io/jenkins/build?labelColor=555555&logoColor=ffffff&style=for-the-badge&jobUrl=https%3A%2F%2Fci.linuxserver.io%2Fjob%2FDocker-Pipeline-Builders%2Fjob%2Fdocker-jellyfin%2Fjob%2Fmaster%2F&logo=jenkins)](https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-jellyfin/job/master/) [![LSIO CI](https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=CI&query=CI&url=https%3A%2F%2Fci-tests.linuxserver.io%2Flinuxserver%2Fjellyfin%2Flatest%2Fci-status.yml)](https://ci-tests.linuxserver.io/linuxserver/jellyfin/latest/index.html) -[Jellyfin](https://jellyfin.github.io/) is a Free Software Media System that puts you in control of managing and streaming your media. It is an alternative to the proprietary Emby and Plex, to provide media from a dedicated server to end-user devices via multiple apps. Jellyfin is descended from Emby's 3.5.2 release and ported to the .NET Core framework to enable full cross-platform support. There are no strings attached, no premium licenses or features, and no hidden agendas: just a team who want to build something better and work together to achieve it. +[Jellyfin](https://github.com/jellyfin/jellyfin) is a Free Software Media System that puts you in control of managing and streaming your media. It is an alternative to the proprietary Emby and Plex, to provide media from a dedicated server to end-user devices via multiple apps. Jellyfin is descended from Emby's 3.5.2 release and ported to the .NET Core framework to enable full cross-platform support. There are no strings attached, no premium licenses or features, and no hidden agendas: just a team who want to build something better and work together to achieve it. -[![jellyfin](https://raw.githubusercontent.com/jellyfin/jellyfin-ux/master/branding/SVG/banner-logo-solid.svg?sanitize=true)](https://jellyfin.github.io/) +[![jellyfin](https://raw.githubusercontent.com/jellyfin/jellyfin-ux/master/branding/SVG/banner-logo-solid.svg?sanitize=true)](https://github.com/jellyfin/jellyfin) ## Supported Architectures diff --git a/readme-vars.yml b/readme-vars.yml index a150283..cc41103 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -2,7 +2,7 @@ # project information project_name: jellyfin -project_url: "https://jellyfin.github.io/" +project_url: "https://github.com/jellyfin/jellyfin" project_logo: "https://raw.githubusercontent.com/jellyfin/jellyfin-ux/master/branding/SVG/banner-logo-solid.svg?sanitize=true" project_lsio_github_repo_url: "https://github.com/linuxserver/docker-{{ project_name }}" project_blurb: "[{{ project_name|capitalize }}]({{ project_url }}) is a Free Software Media System that puts you in control of managing and streaming your media. It is an alternative to the proprietary Emby and Plex, to provide media from a dedicated server to end-user devices via multiple apps. Jellyfin is descended from Emby's 3.5.2 release and ported to the .NET Core framework to enable full cross-platform support. There are no strings attached, no premium licenses or features, and no hidden agendas: just a team who want to build something better and work together to achieve it." diff --git a/root/etc/s6-overlay/s6-rc.d/init-jellyfin-config/run b/root/etc/s6-overlay/s6-rc.d/init-jellyfin-config/run index b35c3f8..8b6a23e 100755 --- a/root/etc/s6-overlay/s6-rc.d/init-jellyfin-config/run +++ b/root/etc/s6-overlay/s6-rc.d/init-jellyfin-config/run @@ -1,4 +1,5 @@ #!/usr/bin/with-contenv bash +# shellcheck shell=bash # create directories mkdir -p \ diff --git a/root/etc/s6-overlay/s6-rc.d/init-jellyfin-video/run b/root/etc/s6-overlay/s6-rc.d/init-jellyfin-video/run index c519926..c765461 100755 --- a/root/etc/s6-overlay/s6-rc.d/init-jellyfin-video/run +++ b/root/etc/s6-overlay/s6-rc.d/init-jellyfin-video/run @@ -1,4 +1,5 @@ #!/usr/bin/with-contenv bash +# shellcheck shell=bash FILES=$(find /dev/dri /dev/dvb /dev/vchiq /dev/vc-mem /dev/video1? -type c -print 2>/dev/null) @@ -7,7 +8,7 @@ do VIDEO_GID=$(stat -c '%g' "$i") if ! id -G abc | grep -qw "$VIDEO_GID"; then VIDEO_NAME=$(getent group "${VIDEO_GID}" | awk -F: '{print $1}') - if [ -z "${VIDEO_NAME}" ]; then + if [[ -z "${VIDEO_NAME}" ]]; then VIDEO_NAME="video$(head /dev/urandom | tr -dc 'a-zA-Z0-9' | head -c8)" groupadd "$VIDEO_NAME" groupmod -g "$VIDEO_GID" "$VIDEO_NAME" @@ -20,7 +21,7 @@ do done # openmax lib loading -if [ -e "/opt/vc/lib" ] && [ ! -e "/etc/ld.so.conf.d/00-vmcs.conf" ]; then +if [[ -e "/opt/vc/lib" ]] && [[ ! -e "/etc/ld.so.conf.d/00-vmcs.conf" ]]; then echo "[jellyfin-init] Pi Libs detected loading" echo "/opt/vc/lib" > "/etc/ld.so.conf.d/00-vmcs.conf" ldconfig 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 new file mode 100755 index 0000000..cbc0190 --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/svc-jellyfin/data/check @@ -0,0 +1,9 @@ +#!/bin/bash + +PORT=$(xmlstarlet sel -T -t -v /NetworkConfiguration/HttpServerPortNumber /config/network.xml) + +if [[ $(curl -sL "http://localhost:${PORT:-8096}/health" | jq -r '.status' 2>/dev/null) = "Healthy" ]]; then + exit 0 +else + exit 1 +fi 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 6196b0f..388e901 100755 --- a/root/etc/s6-overlay/s6-rc.d/svc-jellyfin/run +++ b/root/etc/s6-overlay/s6-rc.d/svc-jellyfin/run @@ -1,4 +1,5 @@ #!/usr/bin/with-contenv bash +# shellcheck shell=bash export \ JELLYFIN_DATA_DIR="/config/data" \