Update readme links and readiness check

This commit is contained in:
TheSpad
2023-07-05 20:20:17 +01:00
parent a60b4529c5
commit 93fb4ac22e
9 changed files with 24 additions and 10 deletions

View File

@@ -1,4 +1,5 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
# create directories
mkdir -p \

View File

@@ -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

View File

@@ -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

View File

@@ -1,4 +1,5 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
export \
JELLYFIN_DATA_DIR="/config/data" \