Make jellyfin script idempotent
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -17,15 +17,12 @@ start() {
|
||||
|
||||
start "$@"
|
||||
|
||||
# shellcheck disable=SC2034
|
||||
JELLYFIN_HOST="http://localhost:8096"
|
||||
# shellcheck disable=SC2034
|
||||
JELLYFIN_ADMIN_USERNAME="${JELLYFIN_ADMIN_USERNAME:-admin}"
|
||||
|
||||
until setup="$(curl -sf --retry 10 --retry-connrefused "$JELLYFIN_HOST/System/Info/Public" | jq -r '.StartupWizardCompleted' 2>/dev/null)"; do
|
||||
echo "Waiting for Jellyfin to be ready..."
|
||||
sleep 1
|
||||
done
|
||||
|
||||
if [ "$setup" = "false" ] && [ -f /etc/jellyfin/setup.sh ]; then
|
||||
if [ -f /etc/jellyfin/setup.sh ]; then
|
||||
# shellcheck disable=SC1091
|
||||
. /etc/jellyfin/setup.sh
|
||||
|
||||
|
Reference in New Issue
Block a user