SPB Git

Repository Public

install.sh 1.4 KB 27 lines shellscript

1#!/bin/bash2# Installs the Jellyfin server (official portable macOS arm64 build) outside the application folder, and prepares its3# configuration. Idempotent: run by `mld deploy` (post_sync hook) and safe to run by hand.4#   JELLYFIN_VERSION   version to install (default below) — to upgrade: change it, re-run, `pm2 restart jellyfin`5set -euo pipefail6VERSION="${JELLYFIN_VERSION:-12.4}"7OPT="$HOME/opt/jellyfin"; DATA="$HOME/data/jellyfin"8mkdir -p "$OPT" "$DATA/data" "$DATA/cache" "$DATA/config" "$DATA/log"; chmod 700 "$DATA"9if [ ! -x "$OPT/$VERSION/jellyfin/jellyfin" ]; then10  url="https://repo.jellyfin.org/files/server/macos/latest-stable/arm64/jellyfin_${VERSION}-arm64.tar.xz"11  echo "  téléchargement de Jellyfin $VERSION"12  tmp="$(mktemp -d)"; curl -fsSL -m 900 -o "$tmp/jf.tar.xz" "$url"13  mkdir -p "$OPT/$VERSION"; tar -xJf "$tmp/jf.tar.xz" -C "$OPT/$VERSION"; rm -rf "$tmp"14  test -x "$OPT/$VERSION/jellyfin/jellyfin"15fi16ln -sfn "$OPT/$VERSION" "$OPT/current"17# Served under /jellyfin so that it can sit behind another site (SP TV) on the same host name.18if [ ! -f "$DATA/config/network.xml" ]; then19  cat > "$DATA/config/network.xml" <<XML20<?xml version="1.0" encoding="utf-8"?>21<NetworkConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">22  <BaseUrl>/jellyfin</BaseUrl>23</NetworkConfiguration>24XML25fi26echo "  jellyfin $VERSION prêt ($OPT/current)"27
Files main
Menu

Theme