mirror of
https://github.com/YunoHost-Apps/jellyfin_ynh.git
synced 2024-09-03 19:26:29 +02:00
Manifestv2
This commit is contained in:
parent
d38c24f378
commit
8d148345c0
39 changed files with 260 additions and 783 deletions
|
@ -1,24 +0,0 @@
|
|||
;; Test complet
|
||||
; Manifest
|
||||
domain="domain.tld"
|
||||
path="/path"
|
||||
is_public=1
|
||||
admin="john"
|
||||
discovery=1
|
||||
; Checks
|
||||
pkg_linter=1
|
||||
setup_sub_dir=1
|
||||
setup_root=1
|
||||
setup_nourl=0
|
||||
setup_private=1
|
||||
setup_public=1
|
||||
upgrade=1
|
||||
# 10.8.0~ynh1
|
||||
upgrade=1 from_commit=384dcd2ff1dbf4b0085edb7f12e4d15f00508e2b
|
||||
backup_restore=1
|
||||
multi_instance=0
|
||||
port_already_use=0
|
||||
change_url=1
|
||||
;;; Options
|
||||
Email=
|
||||
Notification=none
|
|
@ -1,7 +0,0 @@
|
|||
SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/jellyfin-ffmpeg/5.1.2-6/jellyfin-ffmpeg5_5.1.2-6-bullseye_amd64.deb
|
||||
SOURCE_SUM=3dbb0fa5d32abe7fe5b9706f230180300a180707cdebda88b013462333dcdfcc
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=deb
|
||||
SOURCE_IN_SUBDIR=false
|
||||
SOURCE_EXTRACT=false
|
||||
SOURCE_FILENAME=jellyfin-ffmpeg5.deb
|
|
@ -1,7 +0,0 @@
|
|||
SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/jellyfin-ffmpeg/5.1.2-6/jellyfin-ffmpeg5_5.1.2-6-bullseye_arm64.deb
|
||||
SOURCE_SUM=d3785119cdf5263f91c968c9bc0c4d8ac89c489141441e6320f224bf0b2072e6
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=deb
|
||||
SOURCE_IN_SUBDIR=false
|
||||
SOURCE_EXTRACT=false
|
||||
SOURCE_FILENAME=jellyfin-ffmpeg5.deb
|
|
@ -1,7 +0,0 @@
|
|||
SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/jellyfin-ffmpeg/5.1.2-6/jellyfin-ffmpeg5_5.1.2-6-bullseye_armhf.deb
|
||||
SOURCE_SUM=f29c51a4ff70655777f5f106847d8fac86786646e9d7af60420c748c4c8df3fe
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=deb
|
||||
SOURCE_IN_SUBDIR=false
|
||||
SOURCE_EXTRACT=false
|
||||
SOURCE_FILENAME=jellyfin-ffmpeg5.deb
|
|
@ -1,7 +0,0 @@
|
|||
SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/jellyfin-ffmpeg/5.1.2-6/jellyfin-ffmpeg5_5.1.2-6-buster_amd64.deb
|
||||
SOURCE_SUM=1e64a9819fd0bef5b77ba5e3136b63b293b0985519a8a51ebc8168c9eeb76cac
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=deb
|
||||
SOURCE_IN_SUBDIR=false
|
||||
SOURCE_EXTRACT=false
|
||||
SOURCE_FILENAME=jellyfin-ffmpeg5.deb
|
|
@ -1,7 +0,0 @@
|
|||
SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/jellyfin-ffmpeg/5.1.2-6/jellyfin-ffmpeg5_5.1.2-6-buster_arm64.deb
|
||||
SOURCE_SUM=c52297fc7783a072bf042dfd924b7cfe7e169f63389398d43afb8be81059b70f
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=deb
|
||||
SOURCE_IN_SUBDIR=false
|
||||
SOURCE_EXTRACT=false
|
||||
SOURCE_FILENAME=jellyfin-ffmpeg5.deb
|
|
@ -1,7 +0,0 @@
|
|||
SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/jellyfin-ffmpeg/5.1.2-6/jellyfin-ffmpeg5_5.1.2-6-buster_armhf.deb
|
||||
SOURCE_SUM=4a5cec25a7f3468b5e779e6317bc85d69d909bea3fb8a36e75bfdb773546e94b
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=deb
|
||||
SOURCE_IN_SUBDIR=false
|
||||
SOURCE_EXTRACT=false
|
||||
SOURCE_FILENAME=jellyfin-ffmpeg5.deb
|
|
@ -1,7 +0,0 @@
|
|||
SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/jellyfin-ffmpeg/__FFMPEG_PKG_VERSION__/jellyfin-ffmpeg5___FFMPEG_PKG_VERSION__-__DEBIAN_____ARCHITECTURE__.deb
|
||||
SOURCE_SUM=https://repo.jellyfin.org/releases/server/debian/versions/jellyfin-ffmpeg/__FFMPEG_PKG_VERSION__/jellyfin-ffmpeg5___FFMPEG_PKG_VERSION__-__DEBIAN_____ARCHITECTURE__.deb.sha256sum
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=deb
|
||||
SOURCE_IN_SUBDIR=false
|
||||
SOURCE_EXTRACT=false
|
||||
SOURCE_FILENAME=jellyfin-ffmpeg5.deb
|
|
@ -1,7 +0,0 @@
|
|||
SOURCE_URL=https://repo.jellyfin.org/releases/plugin/ldap-authentication/ldap-authentication_16.0.0.0.zip
|
||||
SOURCE_SUM=8857a7dbe8bd08db2a8c10621d388424a389a9f0d98253dbd0ea229310d5cf7f
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=zip
|
||||
SOURCE_IN_SUBDIR=false
|
||||
SOURCE_FILENAME=
|
||||
SOURCE_EXTRACT=true
|
|
@ -1,7 +0,0 @@
|
|||
SOURCE_URL=https://repo.jellyfin.org/releases/plugin/ldap-authentication/ldap-authentication___LDAP_PKG_VERSION__.zip
|
||||
SOURCE_SUM=none
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=zip
|
||||
SOURCE_IN_SUBDIR=false
|
||||
SOURCE_FILENAME=
|
||||
SOURCE_EXTRACT=true
|
|
@ -1,7 +0,0 @@
|
|||
SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/server/10.8.11/jellyfin-server_10.8.11-1_amd64.deb
|
||||
SOURCE_SUM=8d512bf3d457c8cd92ade0cd32ce99d70f5549677779404ae89413ec77248e87
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=deb
|
||||
SOURCE_IN_SUBDIR=false
|
||||
SOURCE_EXTRACT=false
|
||||
SOURCE_FILENAME=jellyfin-server.deb
|
|
@ -1,7 +0,0 @@
|
|||
SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/server/10.8.11/jellyfin-server_10.8.11-1_arm64.deb
|
||||
SOURCE_SUM=a1d132fbf624e9745e43a6600f6364ff15e86c8cf75950a5a44b7a20e6fd41ca
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=deb
|
||||
SOURCE_IN_SUBDIR=false
|
||||
SOURCE_EXTRACT=false
|
||||
SOURCE_FILENAME=jellyfin-server.deb
|
|
@ -1,7 +0,0 @@
|
|||
SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/server/10.8.11/jellyfin-server_10.8.11-1_armhf.deb
|
||||
SOURCE_SUM=f35d0cda50b22be9d5480f68db70bf1b66f0a974d93739a333fa540e941147d1
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=deb
|
||||
SOURCE_IN_SUBDIR=false
|
||||
SOURCE_EXTRACT=false
|
||||
SOURCE_FILENAME=jellyfin-server.deb
|
|
@ -1,7 +0,0 @@
|
|||
SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/server/10.8.11/jellyfin-server_10.8.11-1_amd64.deb
|
||||
SOURCE_SUM=8d512bf3d457c8cd92ade0cd32ce99d70f5549677779404ae89413ec77248e87
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=deb
|
||||
SOURCE_IN_SUBDIR=false
|
||||
SOURCE_EXTRACT=false
|
||||
SOURCE_FILENAME=jellyfin-server.deb
|
|
@ -1,7 +0,0 @@
|
|||
SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/server/10.8.11/jellyfin-server_10.8.11-1_arm64.deb
|
||||
SOURCE_SUM=a1d132fbf624e9745e43a6600f6364ff15e86c8cf75950a5a44b7a20e6fd41ca
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=deb
|
||||
SOURCE_IN_SUBDIR=false
|
||||
SOURCE_EXTRACT=false
|
||||
SOURCE_FILENAME=jellyfin-server.deb
|
|
@ -1,7 +0,0 @@
|
|||
SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/server/10.8.11/jellyfin-server_10.8.11-1_armhf.deb
|
||||
SOURCE_SUM=f35d0cda50b22be9d5480f68db70bf1b66f0a974d93739a333fa540e941147d1
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=deb
|
||||
SOURCE_IN_SUBDIR=false
|
||||
SOURCE_EXTRACT=false
|
||||
SOURCE_FILENAME=jellyfin-server.deb
|
|
@ -1,7 +0,0 @@
|
|||
SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/server/__VERSION__/jellyfin-server___PKG_VERSION_____ARCHITECTURE__.deb
|
||||
SOURCE_SUM=https://repo.jellyfin.org/releases/server/debian/versions/stable/server/__VERSION__/jellyfin-server___PKG_VERSION_____ARCHITECTURE__.deb.sha256sum
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=deb
|
||||
SOURCE_IN_SUBDIR=false
|
||||
SOURCE_EXTRACT=false
|
||||
SOURCE_FILENAME=jellyfin-server.deb
|
|
@ -1,7 +0,0 @@
|
|||
SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/web/10.8.11/jellyfin-web_10.8.11-1_all.deb
|
||||
SOURCE_SUM=9875062909d8a4e7081a50c5aac2fb6378edfeebccb0830a6eadd7e0d04b7f6d
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=deb
|
||||
SOURCE_IN_SUBDIR=false
|
||||
SOURCE_EXTRACT=false
|
||||
SOURCE_FILENAME=jellyfin-web.deb
|
|
@ -1,7 +0,0 @@
|
|||
SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/web/10.8.11/jellyfin-web_10.8.11-1_all.deb
|
||||
SOURCE_SUM=9875062909d8a4e7081a50c5aac2fb6378edfeebccb0830a6eadd7e0d04b7f6d
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=deb
|
||||
SOURCE_IN_SUBDIR=false
|
||||
SOURCE_EXTRACT=false
|
||||
SOURCE_FILENAME=jellyfin-web.deb
|
|
@ -1,7 +0,0 @@
|
|||
SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/web/10.8.11/jellyfin-web_10.8.11-1_all.deb
|
||||
SOURCE_SUM=9875062909d8a4e7081a50c5aac2fb6378edfeebccb0830a6eadd7e0d04b7f6d
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=deb
|
||||
SOURCE_IN_SUBDIR=false
|
||||
SOURCE_EXTRACT=false
|
||||
SOURCE_FILENAME=jellyfin-web.deb
|
|
@ -1,7 +0,0 @@
|
|||
SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/web/10.8.11/jellyfin-web_10.8.11-1_all.deb
|
||||
SOURCE_SUM=9875062909d8a4e7081a50c5aac2fb6378edfeebccb0830a6eadd7e0d04b7f6d
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=deb
|
||||
SOURCE_IN_SUBDIR=false
|
||||
SOURCE_EXTRACT=false
|
||||
SOURCE_FILENAME=jellyfin-web.deb
|
|
@ -1,7 +0,0 @@
|
|||
SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/web/10.8.11/jellyfin-web_10.8.11-1_all.deb
|
||||
SOURCE_SUM=9875062909d8a4e7081a50c5aac2fb6378edfeebccb0830a6eadd7e0d04b7f6d
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=deb
|
||||
SOURCE_IN_SUBDIR=false
|
||||
SOURCE_EXTRACT=false
|
||||
SOURCE_FILENAME=jellyfin-web.deb
|
|
@ -1,7 +0,0 @@
|
|||
SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/web/10.8.11/jellyfin-web_10.8.11-1_all.deb
|
||||
SOURCE_SUM=9875062909d8a4e7081a50c5aac2fb6378edfeebccb0830a6eadd7e0d04b7f6d
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=deb
|
||||
SOURCE_IN_SUBDIR=false
|
||||
SOURCE_EXTRACT=false
|
||||
SOURCE_FILENAME=jellyfin-web.deb
|
|
@ -1,7 +0,0 @@
|
|||
SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/web/__VERSION__/jellyfin-web___PKG_VERSION___all.deb
|
||||
SOURCE_SUM=https://repo.jellyfin.org/releases/server/debian/versions/stable/web/__VERSION__/jellyfin-web___PKG_VERSION___all.deb.sha256sum
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=deb
|
||||
SOURCE_IN_SUBDIR=false
|
||||
SOURCE_EXTRACT=false
|
||||
SOURCE_FILENAME=jellyfin-web.deb
|
|
@ -3,9 +3,10 @@
|
|||
* Users with the `admin` permission will have access to the administration panel.
|
||||
|
||||
* The app can access YunoHost's multimedia directories:
|
||||
choose one of the folders in `/home/yunohost.multimedia/share` upon configuration of your libraries.
|
||||
|
||||
Choose one of the folders in `/home/yunohost.multimedia/share` upon configuration of your libraries.
|
||||
|
||||
* Starting version 10.7.5~ynh2, you can ask for the discovery ports (1900 and 7359) to be opened.
|
||||
They ease the setting up of your media center between clients and server.
|
||||
* If you are upgrading to this version and above, set `discovery: '1'` in `/etc/yunohost/apps/jellyfin/settings.yml`
|
||||
if you want the upgrade to open them for you.
|
||||
|
||||
They ease the setting up of your media center between clients and server.
|
||||
* If you are upgrading to this version and above, set `discovery: '1'` in `/etc/yunohost/apps/jellyfin/settings.yml` if you want the upgrade to open them for you.
|
BIN
doc/screenshots/jellyfin-1.jpg
Normal file
BIN
doc/screenshots/jellyfin-1.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 233 KiB |
BIN
doc/screenshots/jellyfin-2.jpg
Normal file
BIN
doc/screenshots/jellyfin-2.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 160 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.3 MiB |
|
@ -1,77 +0,0 @@
|
|||
{
|
||||
"name": "Jellyfin",
|
||||
"id": "jellyfin",
|
||||
"packaging_format": 1,
|
||||
"description": {
|
||||
"en": "Media System that manage and stream your media",
|
||||
"fr": "Système multimédia qui gère et diffuse vos médias"
|
||||
},
|
||||
"version": "10.8.11~ynh2",
|
||||
"url": "https://jellyfin.org",
|
||||
"upstream": {
|
||||
"license": "GPL-2.0-only",
|
||||
"website": "https://jellyfin.org",
|
||||
"demo": "https://demo.jellyfin.org/stable/web/index.html",
|
||||
"userdoc": "https://jellyfin.org/docs/",
|
||||
"code": "https://github.com/jellyfin/jellyfin",
|
||||
"cpe": "cpe:2.3:a:jellyfin:jellyfin"
|
||||
},
|
||||
"license": "GPL-2.0-only",
|
||||
"maintainer": {
|
||||
"name": "tituspijean",
|
||||
"email": "tituspijean@outlook.com"
|
||||
},
|
||||
"previous_maintainers": [
|
||||
{
|
||||
"name": "liberodark",
|
||||
"email": "liberodark@gmail.com"
|
||||
}
|
||||
],
|
||||
"requirements": {
|
||||
"yunohost": ">= 11.0.9"
|
||||
},
|
||||
"multi_instance": false,
|
||||
"services": [
|
||||
"nginx"
|
||||
],
|
||||
"arguments": {
|
||||
"install": [
|
||||
{
|
||||
"name": "domain",
|
||||
"type": "domain"
|
||||
},
|
||||
{
|
||||
"name": "path",
|
||||
"type": "path",
|
||||
"example": "/jellyfin",
|
||||
"default": "/jellyfin"
|
||||
},
|
||||
{
|
||||
"name": "is_public",
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"help": {
|
||||
"en": "Jellyfin has its own login system, you should make it public to let external clients access it (mobile app, etc.).",
|
||||
"fr": "Jellyfin a son propre système de connexion, vous devriez la laisser publique pour permettre la connexion de clients externes (app mobile, etc.)."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "admin",
|
||||
"type": "user"
|
||||
},
|
||||
{
|
||||
"name": "discovery",
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"ask": {
|
||||
"en": "Should the ports for client and server discovery be opened?",
|
||||
"fr": "Est-ce que les ports pour la découverte entre clients et serveur doivent être ouverts ?"
|
||||
},
|
||||
"help": {
|
||||
"en": "Enable discovery if you use Jellyfin on your local network or through a VPN to smoothen detection between clients and server. If it is installed on a VPS and only accessed via its web interface, you should disable discovery.",
|
||||
"fr": "Activez la découverte si vous utilisez Jellyfin sur votre réseau local ou via un VPN pour simplifier la détection entre clients et serveur. S'il est installé sur un VPS et utilisé uniquement via son interface web, vous devriez désactiver la découverte."
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
151
manifest.toml
Normal file
151
manifest.toml
Normal file
|
@ -0,0 +1,151 @@
|
|||
#:schema https://raw.githubusercontent.com/YunoHost/apps/master/schemas/manifest.v2.schema.json
|
||||
|
||||
packaging_format = 2
|
||||
|
||||
id = "jellyfin"
|
||||
name = "Jellyfin"
|
||||
description.en = "Media System that manage and stream your media"
|
||||
description.fr = "Système multimédia qui gère et diffuse vos médias"
|
||||
|
||||
version = "10.8.11~ynh3"
|
||||
|
||||
maintainers = ["tituspijean"]
|
||||
|
||||
[upstream]
|
||||
license = "GPL-2.0-only"
|
||||
website = "https://jellyfin.org"
|
||||
demo = "https://demo.jellyfin.org/stable/web/index.html"
|
||||
userdoc = "https://jellyfin.org/docs/"
|
||||
code = "https://github.com/jellyfin/jellyfin"
|
||||
cpe = "cpe:2.3:a:jellyfin:jellyfin"
|
||||
fund = "https://opencollective.com/jellyfin"
|
||||
|
||||
[integration]
|
||||
yunohost = ">= 11.0.9"
|
||||
architectures = ["armhf", "arm64", "amd64"]
|
||||
multi_instance = false
|
||||
ldap = true
|
||||
sso = true
|
||||
disk = "300M"
|
||||
ram.build = "200M"
|
||||
ram.runtime = "100M"
|
||||
|
||||
[install]
|
||||
[install.domain]
|
||||
type = "domain"
|
||||
|
||||
[install.path]
|
||||
type = "path"
|
||||
default = "/jellyfin"
|
||||
|
||||
[install.init_main_permission]
|
||||
help.en = "Jellyfin has its own login system, you should make it public to let external clients access it (mobile app, etc.)."
|
||||
help.fr = "Jellyfin a son propre système de connexion, vous devriez la laisser publique pour permettre la connexion de clients externes (app mobile, etc.)."
|
||||
type = "group"
|
||||
default = "visitors"
|
||||
|
||||
[install.admin]
|
||||
type = "user"
|
||||
|
||||
[install.discovery]
|
||||
ask.en = "Should the ports for client and server discovery be opened?"
|
||||
ask.fr = "Est-ce que les ports pour la découverte entre clients et serveur doivent être ouverts ?"
|
||||
help.en = "Enable discovery if you use Jellyfin on your local network or through a VPN to smoothen detection between clients and server. If it is installed on a VPS and only accessed via its web interface, you should disable discovery."
|
||||
help.fr = "Activez la découverte si vous utilisez Jellyfin sur votre réseau local ou via un VPN pour simplifier la détection entre clients et serveur. S'il est installé sur un VPS et utilisé uniquement via son interface web, vous devriez désactiver la découverte."
|
||||
type = "boolean"
|
||||
default = true
|
||||
|
||||
[resources]
|
||||
[resources.sources]
|
||||
[resources.sources.server]
|
||||
armhf.url = "https://repo.jellyfin.org/releases/server/debian/versions/stable/server/10.8.11/jellyfin-server_10.8.11-1_armhf.deb"
|
||||
armhf.sha256 = "f35d0cda50b22be9d5480f68db70bf1b66f0a974d93739a333fa540e941147d1"
|
||||
|
||||
arm64.url = "https://repo.jellyfin.org/releases/server/debian/versions/stable/server/10.8.11/jellyfin-server_10.8.11-1_arm64.deb"
|
||||
arm64.sha256 = "a1d132fbf624e9745e43a6600f6364ff15e86c8cf75950a5a44b7a20e6fd41ca"
|
||||
|
||||
amd64.url = "https://repo.jellyfin.org/releases/server/debian/versions/stable/server/10.8.11/jellyfin-server_10.8.11-1_amd64.deb"
|
||||
amd64.sha256 = "8d512bf3d457c8cd92ade0cd32ce99d70f5549677779404ae89413ec77248e87"
|
||||
|
||||
rename = "jellyfin-server.deb"
|
||||
format = "whatever"
|
||||
extract = false
|
||||
|
||||
[resources.sources.web]
|
||||
url = "https://repo.jellyfin.org/releases/server/debian/versions/stable/web/10.8.11/jellyfin-web_10.8.11-1_all.deb"
|
||||
sha256 = "9875062909d8a4e7081a50c5aac2fb6378edfeebccb0830a6eadd7e0d04b7f6d"
|
||||
|
||||
rename = "jellyfin-web.deb"
|
||||
format = "whatever"
|
||||
extract = false
|
||||
|
||||
|
||||
# [resources.sources.ffmpeg_bookworm]
|
||||
# armhf.url = "https://repo.jellyfin.org/releases/server/debian/versions/jellyfin-ffmpeg/5.1.2-6/jellyfin-ffmpeg5_5.1.2-6-bookworm_armhf.deb"
|
||||
# armhf.sha256 = "Not"
|
||||
|
||||
# arm64.url = "https://repo.jellyfin.org/releases/server/debian/versions/jellyfin-ffmpeg/5.1.2-6/jellyfin-ffmpeg5_5.1.2-6-bookworm_arm64.deb"
|
||||
# arm64.sha256 = "Not"
|
||||
|
||||
# amd64.url = "https://repo.jellyfin.org/releases/server/debian/versions/jellyfin-ffmpeg/5.1.2-6/jellyfin-ffmpeg5_5.1.2-6-bookworm_amd64.deb"
|
||||
# amd64.sha256 = "Not"
|
||||
|
||||
# rename = "jellyfin-ffmpeg5.deb"
|
||||
# format = "whatever"
|
||||
# extract = false
|
||||
|
||||
|
||||
[resources.sources.ffmpeg_bullseye]
|
||||
armhf.url = "https://repo.jellyfin.org/releases/server/debian/versions/jellyfin-ffmpeg/5.1.2-6/jellyfin-ffmpeg5_5.1.2-6-bullseye_armhf.deb"
|
||||
armhf.sha256 = "f29c51a4ff70655777f5f106847d8fac86786646e9d7af60420c748c4c8df3fe"
|
||||
|
||||
arm64.url = "https://repo.jellyfin.org/releases/server/debian/versions/jellyfin-ffmpeg/5.1.2-6/jellyfin-ffmpeg5_5.1.2-6-bullseye_arm64.deb"
|
||||
arm64.sha256 = "d3785119cdf5263f91c968c9bc0c4d8ac89c489141441e6320f224bf0b2072e6"
|
||||
|
||||
amd64.url = "https://repo.jellyfin.org/releases/server/debian/versions/jellyfin-ffmpeg/5.1.2-6/jellyfin-ffmpeg5_5.1.2-6-bullseye_amd64.deb"
|
||||
amd64.sha256 = "3dbb0fa5d32abe7fe5b9706f230180300a180707cdebda88b013462333dcdfcc"
|
||||
|
||||
rename = "jellyfin-ffmpeg5.deb"
|
||||
format = "whatever"
|
||||
extract = false
|
||||
|
||||
|
||||
[resources.sources.ffmpeg_buster]
|
||||
armhf.url = "https://repo.jellyfin.org/releases/server/debian/versions/jellyfin-ffmpeg/5.1.2-6/jellyfin-ffmpeg5_5.1.2-6-buster_armhf.deb"
|
||||
armhf.sha256 = "4a5cec25a7f3468b5e779e6317bc85d69d909bea3fb8a36e75bfdb773546e94b"
|
||||
|
||||
arm64.url = "https://repo.jellyfin.org/releases/server/debian/versions/jellyfin-ffmpeg/5.1.2-6/jellyfin-ffmpeg5_5.1.2-6-buster_arm64.deb"
|
||||
arm64.sha256 = "c52297fc7783a072bf042dfd924b7cfe7e169f63389398d43afb8be81059b70f"
|
||||
|
||||
amd64.url = "https://repo.jellyfin.org/releases/server/debian/versions/jellyfin-ffmpeg/5.1.2-6/jellyfin-ffmpeg5_5.1.2-6-buster_amd64.deb"
|
||||
amd64.sha256 = "1e64a9819fd0bef5b77ba5e3136b63b293b0985519a8a51ebc8168c9eeb76cac"
|
||||
rename = "jellyfin-ffmpeg5.deb"
|
||||
format = "whatever"
|
||||
extract = false
|
||||
|
||||
|
||||
[resources.sources.plugin_ldap]
|
||||
url = "https://repo.jellyfin.org/releases/plugin/ldap-authentication/ldap-authentication_16.0.0.0.zip"
|
||||
sha256 = "8857a7dbe8bd08db2a8c10621d388424a389a9f0d98253dbd0ea229310d5cf7f"
|
||||
in_subdir = false
|
||||
|
||||
|
||||
# Handled by the deb package
|
||||
# [resources.system_user]
|
||||
# home = "/var/lib/jellyfin"
|
||||
|
||||
# [resources.install_dir]
|
||||
# dir = "/var/lib/jellyfin"
|
||||
|
||||
[resources.permissions]
|
||||
# auth_header=false is because Jellyfin expects custom data in the Authorization HTTP header (notably, for Jellyfin Vue)
|
||||
main.url = "/"
|
||||
main.auth_header = false
|
||||
|
||||
admin.protected = true
|
||||
admin.auth_header = false
|
||||
|
||||
[resources.ports]
|
||||
main.default = 8095
|
||||
|
||||
[resources.apt]
|
|
@ -14,80 +14,31 @@ ldap_pkg_version="16.0.0.0"
|
|||
discovery_service_port=1900
|
||||
discovery_client_port=7359
|
||||
|
||||
ffmpeg_deps=(
|
||||
libass9
|
||||
libbluray2
|
||||
libc6
|
||||
libdrm2
|
||||
libfontconfig1
|
||||
libfreetype6
|
||||
libfribidi0
|
||||
libgcc1
|
||||
libgmp10
|
||||
libgnutls30
|
||||
libllvm13
|
||||
libmp3lame0
|
||||
libopus0
|
||||
libstdc++6
|
||||
libtheora0
|
||||
libvdpau1
|
||||
libvorbis0a
|
||||
libvorbisenc2
|
||||
libwebp6
|
||||
libwebpmux3
|
||||
libx11-6
|
||||
libxcb-randr0
|
||||
libzvbi0
|
||||
zlib1g
|
||||
)
|
||||
# Those directories are handled by the deb package
|
||||
data_path="/var/lib/$app"
|
||||
config_path="/etc/$app"
|
||||
log_path="/var/log/$app"
|
||||
cache_path="/var/cache/$app"
|
||||
|
||||
case "$debian" in
|
||||
buster) ffmpeg_deps+=( libvpx5 libx264-155 libx265-165 ) ;;
|
||||
bullseye) ffmpeg_deps+=( libvpx6 libx264-160 libx265-192 ) ;;
|
||||
*) echo "Unknown release: $debian" >&2; exit 1 ;;
|
||||
esac
|
||||
case "$YNH_ARCH" in
|
||||
arm64) : ;;
|
||||
armhf) : ;;
|
||||
*) ffmpeg_deps+=( libdrm-intel1 libopencl1 ) ;;
|
||||
esac
|
||||
|
||||
jellyfin_deps=(at libsqlite3-0 libfontconfig1 libfreetype6 libssl1.1)
|
||||
|
||||
pkg_dependencies="${ffmpeg_deps[*]} ${jellyfin_deps[*]}"
|
||||
|
||||
#=================================================
|
||||
# PERSONAL HELPERS
|
||||
#=================================================
|
||||
|
||||
install_jellyfin_packages() {
|
||||
# In case of a new version, the url change from
|
||||
# https://repo.jellyfin.org/releases/server/debian/versions/stable/server/X.X.X/jellyfin-server_X.X.X-1_$YNH_ARCH.deb to
|
||||
# https://repo.jellyfin.org/archive/debian/stable/X.X.X/server/jellyfin-server_X.X.X-1_$YNH_ARCH.deb
|
||||
for pkg in web server; do
|
||||
src_url=$(grep 'SOURCE_URL=' "$YNH_APP_BASEDIR/conf/$pkg.$debian.$YNH_ARCH.src" | cut -d= -f2-)
|
||||
if ! curl --output /dev/null --silent --head --fail "$src_url"; then
|
||||
ynh_replace_string \
|
||||
--match_string="releases/server/debian/versions/stable/$pkg/$version/" \
|
||||
--replace_string="archive/debian/stable/$version/$pkg/" \
|
||||
--target_file="$YNH_APP_BASEDIR/conf/$pkg.$debian.$YNH_ARCH.src"
|
||||
fi
|
||||
done
|
||||
|
||||
# Create the temporary directory
|
||||
tempdir="$(mktemp -d)"
|
||||
|
||||
# Download the deb files
|
||||
ynh_setup_source --dest_dir=$tempdir --source_id="ffmpeg.$debian.$YNH_ARCH"
|
||||
ynh_setup_source --dest_dir=$tempdir --source_id="server.$debian.$YNH_ARCH"
|
||||
ynh_setup_source --dest_dir=$tempdir --source_id="web.$debian.$YNH_ARCH"
|
||||
ynh_setup_source --dest_dir="$tempdir" --source_id="web"
|
||||
ynh_setup_source --dest_dir="$tempdir" --source_id="ffmpeg_$debian"
|
||||
ynh_setup_source --dest_dir="$tempdir" --source_id="server"
|
||||
|
||||
# Install the packages
|
||||
ynh_exec_warn_less dpkg --force-confdef --force-confnew -i $tempdir/jellyfin-web.deb
|
||||
ynh_exec_warn_less dpkg --force-confdef --force-confnew -i $tempdir/jellyfin-ffmpeg5.deb
|
||||
ynh_exec_warn_less dpkg --force-confdef --force-confnew -i $tempdir/jellyfin-server.deb
|
||||
|
||||
ynh_secure_remove --file="$tempdir"
|
||||
ynh_package_install \
|
||||
"$tempdir/jellyfin-web.deb" \
|
||||
"$tempdir/jellyfin-ffmpeg5.deb" \
|
||||
"$tempdir/jellyfin-server.deb"
|
||||
|
||||
# The doc says it should be called only once,
|
||||
# but the code says multiple calls are supported.
|
||||
|
@ -96,6 +47,36 @@ install_jellyfin_packages() {
|
|||
jellyfin-web="$pkg_version" \
|
||||
jellyfin-ffmpeg5="$ffmpeg_pkg_version-$debian" \
|
||||
jellyfin-server="$pkg_version"
|
||||
|
||||
# Mark packages as dependencies, to allow automatic removal
|
||||
apt-mark auto jellyfin-server jellyfin-web jellyfin-ffmpeg5
|
||||
}
|
||||
|
||||
open_jellyfin_discovery_ports() {
|
||||
discovery_service=$discovery
|
||||
discovery_client=$discovery
|
||||
|
||||
if [ "$discovery" -eq 1 ]; then
|
||||
|
||||
# Open port $discovery_service_port for service auto-discovery
|
||||
if ynh_port_available --port=$discovery_service_port; then
|
||||
ynh_exec_warn_less yunohost firewall allow UDP $discovery_service_port
|
||||
else
|
||||
discovery_service=0
|
||||
ynh_print_warn --message="Port $discovery_service_port (for service auto-discovery) is not available. Continuing nonetheless."
|
||||
fi
|
||||
|
||||
# Open port $discovery_client_port for client auto-discovery
|
||||
if ynh_port_available --port=$discovery_client_port; then
|
||||
ynh_exec_warn_less yunohost firewall allow UDP $discovery_client_port
|
||||
else
|
||||
discovery_client=0
|
||||
ynh_print_warn --message="Port $discovery_client_port (for client auto-discovery) is not available. Continuing nonetheless."
|
||||
fi
|
||||
fi
|
||||
|
||||
ynh_app_setting_set --app="$app" --key=discovery_service --value="$discovery_service"
|
||||
ynh_app_setting_set --app="$app" --key=discovery_client --value="$discovery_client"
|
||||
}
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -10,27 +10,6 @@
|
|||
source ../settings/scripts/_common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# MANAGE SCRIPT FAILURE
|
||||
#=================================================
|
||||
|
||||
ynh_clean_setup () {
|
||||
true
|
||||
}
|
||||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
#=================================================
|
||||
ynh_print_info --message="Loading installation settings..."
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||
config_path=$(ynh_app_setting_get --app=$app --key=config_path)
|
||||
|
||||
#=================================================
|
||||
# DECLARE DATA AND CONF FILES TO BACKUP
|
||||
#=================================================
|
||||
|
@ -40,7 +19,9 @@ ynh_print_info --message="Declaring files to be backed up..."
|
|||
# BACKUP THE APP MAIN DIR
|
||||
#=================================================
|
||||
|
||||
ynh_backup --src_path="$final_path"
|
||||
ynh_backup --src_path="$data_path"
|
||||
ynh_backup --src_path="$config_path"
|
||||
ynh_backup --src_path="/etc/default/jellyfin" --not_mandatory
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE NGINX CONFIGURATION
|
||||
|
@ -62,13 +43,6 @@ ynh_backup --src_path="/etc/logrotate.d/$app"
|
|||
|
||||
ynh_backup --src_path="/etc/systemd/system/jellyfin.service.d" --not_mandatory
|
||||
|
||||
#=================================================
|
||||
# BACKUP VARIOUS FILES
|
||||
#=================================================
|
||||
|
||||
ynh_backup --src_path="$config_path"
|
||||
ynh_backup --src_path="/etc/default/jellyfin" --not_mandatory
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
|
|
@ -9,64 +9,6 @@
|
|||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# RETRIEVE ARGUMENTS
|
||||
#=================================================
|
||||
|
||||
old_domain=$YNH_APP_OLD_DOMAIN
|
||||
old_path=$YNH_APP_OLD_PATH
|
||||
|
||||
new_domain=$YNH_APP_NEW_DOMAIN
|
||||
new_path=$YNH_APP_NEW_PATH
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Loading installation settings..." --weight=1
|
||||
|
||||
# Needed for helper "ynh_add_nginx_config"
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
|
||||
# Add settings here as needed by your application
|
||||
port=$(ynh_app_setting_get --app="$app" --key=port)
|
||||
config_path=$(ynh_app_setting_get --app="$app" --key=config_path)
|
||||
|
||||
#=================================================
|
||||
# BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=10
|
||||
|
||||
# Backup the current version of the app
|
||||
ynh_backup_before_upgrade
|
||||
ynh_clean_setup () {
|
||||
ynh_clean_check_starting
|
||||
# Remove the new domain config file, the remove script won't do it as it doesn't know yet its location.
|
||||
ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf"
|
||||
|
||||
# Restore it if the upgrade fails
|
||||
ynh_restore_upgradebackup
|
||||
}
|
||||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# CHECK WHICH PARTS SHOULD BE CHANGED
|
||||
#=================================================
|
||||
|
||||
change_domain=0
|
||||
if [ "$old_domain" != "$new_domain" ]
|
||||
then
|
||||
change_domain=1
|
||||
fi
|
||||
|
||||
change_path=0
|
||||
if [ "$old_path" != "$new_path" ]
|
||||
then
|
||||
change_path=1
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# STANDARD MODIFICATIONS
|
||||
#=================================================
|
||||
|
@ -81,29 +23,7 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" --li
|
|||
#=================================================
|
||||
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1
|
||||
|
||||
nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf
|
||||
|
||||
# Change the path in the NGINX config file
|
||||
if [ $change_path -eq 1 ]
|
||||
then
|
||||
# Make a backup of the original NGINX config file if modified
|
||||
ynh_backup_if_checksum_is_different --file="$nginx_conf_path"
|
||||
# Set global variables for NGINX helper
|
||||
domain="$old_domain"
|
||||
path_url="$new_path"
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
fi
|
||||
|
||||
# Change the domain for NGINX
|
||||
if [ $change_domain -eq 1 ]
|
||||
then
|
||||
# Delete file checksum for the old conf file location
|
||||
ynh_delete_file_checksum --file="$nginx_conf_path"
|
||||
mv $nginx_conf_path /etc/nginx/conf.d/$new_domain.d/$app.conf
|
||||
# Store file checksum for the new config file location
|
||||
ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf"
|
||||
fi
|
||||
ynh_change_url_nginx_config
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC MODIFICATIONS
|
||||
|
@ -131,13 +51,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=2
|
|||
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Started Jellyfin Media Server" --timeout=15
|
||||
|
||||
#=================================================
|
||||
# RELOAD NGINX
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reloading NGINX web server..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
|
151
scripts/install
151
scripts/install
|
@ -10,99 +10,23 @@ source _common.sh
|
|||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# MANAGE SCRIPT FAILURE
|
||||
# CREATE DIRECTORIES
|
||||
#=================================================
|
||||
|
||||
ynh_clean_setup () {
|
||||
ynh_clean_check_starting
|
||||
}
|
||||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# RETRIEVE ARGUMENTS FROM THE MANIFEST
|
||||
#=================================================
|
||||
|
||||
domain=$YNH_APP_ARG_DOMAIN
|
||||
path_url=$YNH_APP_ARG_PATH
|
||||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||
admin=$YNH_APP_ARG_ADMIN
|
||||
discovery=$YNH_APP_ARG_DISCOVERY
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
#=================================================
|
||||
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Validating installation parameters..." --weight=1
|
||||
|
||||
final_path=/var/lib/jellyfin
|
||||
config_path=/etc/jellyfin
|
||||
test ! -e "$final_path" || ynh_die --message="There is already a directory: $final_path "
|
||||
test ! -e "$config_path" || ynh_die --message="There is already a directory: $config_path "
|
||||
|
||||
if [[ ! "$YNH_ARCH" =~ ^(amd64|arm64|armhf)$ ]]; then
|
||||
ynh_die "Jellyfin is not compatible with your architecture, $YNH_ARCH, which is neither amd64, arm64, or armhf." 1
|
||||
if [ -d "$config_path" ]; then
|
||||
ynh_die --message="There is already a directory: $config_path "
|
||||
fi
|
||||
|
||||
# Register (book) web path
|
||||
ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url
|
||||
|
||||
#=================================================
|
||||
# STORE SETTINGS FROM MANIFEST
|
||||
#=================================================
|
||||
ynh_script_progression --message="Storing installation settings..." --weight=2
|
||||
|
||||
ynh_app_setting_set --app=$app --key=domain --value=$domain
|
||||
ynh_app_setting_set --app=$app --key=path --value=$path_url
|
||||
ynh_app_setting_set --app=$app --key=admin --value=$admin
|
||||
ynh_app_setting_set --app=$app --key=discovery --value=$discovery
|
||||
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||
ynh_app_setting_set --app=$app --key=config_path --value=$config_path
|
||||
ynh_app_setting_set --app="$app" --key=config_path --value="$config_path"
|
||||
|
||||
#=================================================
|
||||
# STANDARD MODIFICATIONS
|
||||
#=================================================
|
||||
# FIND AND OPEN A PORT
|
||||
# OPEN PORTS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Finding an available port..." --weight=1
|
||||
|
||||
# Find an available port
|
||||
port=$(ynh_find_port --port=8095)
|
||||
ynh_app_setting_set --app=$app --key=port --value=$port
|
||||
ynh_script_progression --message="Configuring firewall..." --weight=1
|
||||
|
||||
discovery_service=$discovery
|
||||
discovery_client=$discovery
|
||||
|
||||
if [ $discovery -eq 1 ]; then
|
||||
ynh_script_progression --message="Configuring firewall..." --weight=1
|
||||
|
||||
# Open port $discovery_service_port for service auto-discovery
|
||||
if ynh_port_available --port=$discovery_service_port; then
|
||||
ynh_exec_warn_less yunohost firewall allow UDP $discovery_service_port
|
||||
else
|
||||
discovery_service=0
|
||||
ynh_print_warn --message="Port $discovery_service_port (for service auto-discovery) is not available. Continuing nonetheless."
|
||||
fi
|
||||
|
||||
# Open port $discovery_client_port for client auto-discovery
|
||||
if ynh_port_available --port=$discovery_client_port; then
|
||||
ynh_exec_warn_less yunohost firewall allow UDP $discovery_client_port
|
||||
else
|
||||
discovery_client=0
|
||||
ynh_print_warn --message="Port $discovery_client_port (for client auto-discovery) is not available. Continuing nonetheless."
|
||||
fi
|
||||
fi
|
||||
|
||||
ynh_app_setting_set --app=$app --key=discovery_service --value=$discovery_service
|
||||
ynh_app_setting_set --app=$app --key=discovery_client --value=$discovery_client
|
||||
|
||||
#=================================================
|
||||
# INSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Installing dependencies..." --weight=5
|
||||
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
open_jellyfin_discovery_ports
|
||||
|
||||
#=================================================
|
||||
# INSTALL PACKAGES
|
||||
|
@ -112,24 +36,15 @@ ynh_script_progression --message="Installing packages..." --weight=1
|
|||
install_jellyfin_packages
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring system user..." --weight=2
|
||||
|
||||
# Create a system user
|
||||
ynh_system_user_create --username=$app
|
||||
# SYSTEM CONFIGURATION
|
||||
#=================================================ç
|
||||
ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
|
||||
|
||||
if grep -q "^render:" /etc/group; then
|
||||
# Add user to render group
|
||||
adduser $app render
|
||||
adduser "$app" render
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring NGINX web server..." --weight=6
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
|
@ -142,7 +57,7 @@ sleep 30
|
|||
|
||||
ynh_script_progression --message="Adding a configuration file..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" --line_match="Stopped Jellyfin Media Server" --timeout=15
|
||||
ynh_systemd_action --service_name="$app" --action="stop" --log_path="systemd" --line_match="Stopped Jellyfin Media Server" --timeout=15
|
||||
|
||||
ynh_add_config --template="system.xml" --destination="$config_path/system.xml"
|
||||
ynh_add_config --template="network.xml" --destination="$config_path/network.xml"
|
||||
|
@ -153,7 +68,7 @@ ynh_add_config --template="logging.json" --destination="$config_path/logging.jso
|
|||
#=================================================
|
||||
ynh_script_progression --message="Installing LDAP plugin..." --weight=2
|
||||
|
||||
ynh_setup_source --dest_dir="/var/lib/jellyfin/plugins/LDAP Authentication" --source_id=ldap
|
||||
ynh_setup_source --dest_dir="/var/lib/jellyfin/plugins/LDAP Authentication" --source_id=plugin_ldap
|
||||
mkdir -p /var/lib/jellyfin/plugins/configurations/
|
||||
ynh_add_config --template="LDAP-Auth.xml" --destination="/var/lib/jellyfin/plugins/configurations/LDAP-Auth.xml"
|
||||
|
||||
|
@ -163,8 +78,8 @@ ynh_add_config --template="LDAP-Auth.xml" --destination="/var/lib/jellyfin/plugi
|
|||
ynh_script_progression --message="Securing files and directories..."
|
||||
|
||||
# Set permissions to app files
|
||||
chown -R $app: $final_path
|
||||
chown -R $app: $config_path
|
||||
chown -R "$app:" "$data_path"
|
||||
chown -R "$app:" "$config_path"
|
||||
|
||||
#=================================================
|
||||
# YUNOHOST MULTIMEDIA INTEGRATION
|
||||
|
@ -174,7 +89,7 @@ ynh_script_progression --message="Adding multimedia directories..." --weight=2
|
|||
# Build YunoHost multimedia directories
|
||||
ynh_multimedia_build_main_dir
|
||||
# Allow Jellyfin to write into these directories
|
||||
ynh_multimedia_addaccess $app
|
||||
ynh_multimedia_addaccess "$app"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
|
@ -191,7 +106,10 @@ ynh_use_logrotate
|
|||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
|
||||
|
||||
yunohost service add $app --description="Jellyfin media center"
|
||||
yunohost service add "$app" --description="Jellyfin media center"
|
||||
|
||||
# Only the admin can access the admin panel of the app (if the app has an admin panel)
|
||||
ynh_permission_update --permission="admin" --add="$admin"
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
|
@ -199,34 +117,7 @@ yunohost service add $app --description="Jellyfin media center"
|
|||
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||
|
||||
# Start a systemd service
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Started Jellyfin Media Server" --timeout=15
|
||||
|
||||
#=================================================
|
||||
# SETUP SSOWAT
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring permissions..." --weight=1
|
||||
|
||||
# Make app public if necessary
|
||||
if [ $is_public -eq 1 ]
|
||||
then
|
||||
# Everyone can access the app.
|
||||
# The "main" permission is automatically created before the install script.
|
||||
ynh_permission_update --permission="main" --add="visitors"
|
||||
fi
|
||||
|
||||
# auth_header=false is because Jellyfin expects custom data in the Authorization HTTP header
|
||||
# (notably, for Jellyfin Vue)
|
||||
ynh_permission_url --permission="main" --auth_header=false
|
||||
|
||||
# Only the admin can access the admin panel of the app (if the app has an admin panel)
|
||||
ynh_permission_create --permission="admin" --auth_header=false --allowed=$admin
|
||||
|
||||
#=================================================
|
||||
# RELOAD NGINX
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reloading NGINX web server..." --weight=2
|
||||
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
ynh_systemd_action --service_name="$app" --action="start" --log_path="systemd" --line_match="Started Jellyfin Media Server" --timeout=15
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
|
@ -9,19 +9,6 @@
|
|||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Loading installation settings..." --weight=1
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||
discovery_client=$(ynh_app_setting_get --app=$app --key=discovery_client)
|
||||
discovery_service=$(ynh_app_setting_get --app=$app --key=discovery_service)
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
config_path=$(ynh_app_setting_get --app=$app --key=config_path)
|
||||
|
||||
#=================================================
|
||||
# STANDARD REMOVE
|
||||
#=================================================
|
||||
|
@ -32,41 +19,25 @@ config_path=$(ynh_app_setting_get --app=$app --key=config_path)
|
|||
if ynh_exec_warn_less yunohost service status $app >/dev/null
|
||||
then
|
||||
ynh_script_progression --message="Removing $app service integration..." --weight=3
|
||||
yunohost service remove $app
|
||||
yunohost service remove "$app"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# REMOVE LOGROTATE CONFIGURATION
|
||||
# REMOVE SYSTEM CONFIGURATIONS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing logrotate configuration..." --weight=1
|
||||
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
|
||||
|
||||
# Remove the app-specific logrotate config
|
||||
ynh_remove_logrotate
|
||||
|
||||
#=================================================
|
||||
# REMOVE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1
|
||||
|
||||
# Remove the dedicated NGINX config
|
||||
ynh_remove_nginx_config
|
||||
|
||||
#=================================================
|
||||
# REMOVE DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing dependencies..." --weight=3
|
||||
|
||||
# Remove metapackage and its dependencies
|
||||
ynh_remove_app_dependencies
|
||||
|
||||
#=================================================
|
||||
# REMOVE PACKAGES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing packages..." --weight=1
|
||||
|
||||
dpkg --remove jellyfin-web
|
||||
dpkg --remove jellyfin-server
|
||||
dpkg --remove jellyfin-ffmpeg5
|
||||
ynh_remove_app_dependencies
|
||||
# jellyfin-web jellyfin-ffmpeg5 jellyfin-server
|
||||
|
||||
#=================================================
|
||||
# CLOSE A PORT
|
||||
|
@ -91,7 +62,6 @@ fi
|
|||
#=================================================
|
||||
ynh_script_progression --message="Removing various files..." --weight=1
|
||||
|
||||
ynh_secure_remove --file="$final_path"
|
||||
ynh_secure_remove --file="$config_path"
|
||||
ynh_secure_remove --file="/etc/systemd/system/jellyfin.service.d"
|
||||
ynh_secure_remove --file="/etc/sudoers.d/jellyfin-sudoers"
|
||||
|
@ -99,16 +69,6 @@ ynh_secure_remove --file="/etc/sudoers.d/jellyfin-sudoers"
|
|||
# Remove the log files
|
||||
ynh_secure_remove --file="/var/log/$app"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
# REMOVE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing the dedicated system user..." --weight=2
|
||||
|
||||
# Delete a system user
|
||||
ynh_system_user_delete --username=$app
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
|
|
@ -10,53 +10,15 @@
|
|||
source ../settings/scripts/_common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# MANAGE SCRIPT FAILURE
|
||||
#=================================================
|
||||
|
||||
ynh_clean_setup () {
|
||||
ynh_clean_check_starting
|
||||
}
|
||||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Loading installation settings..." --weight=1
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
config_path=$(ynh_app_setting_get --app=$app --key=config_path)
|
||||
discovery=$(ynh_app_setting_get --app=$app --key=discovery)
|
||||
|
||||
#=================================================
|
||||
# CHECK IF THE APP CAN BE RESTORED
|
||||
#=================================================
|
||||
ynh_script_progression --message="Validating restoration parameters..." --weight=2
|
||||
|
||||
test ! -d $final_path \
|
||||
|| ynh_die --message="There is already a directory: $final_path "
|
||||
test ! -d $config_path \
|
||||
|| ynh_die --message="There is already a directory: $config_path "
|
||||
|
||||
if [[ ! "$YNH_ARCH" =~ ^(amd64|arm64|armhf)$ ]]; then
|
||||
ynh_die "Jellyfin is not compatible with your architecture, $YNH_ARCH, which is neither amd64, arm64, or armhf." 1
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# STANDARD RESTORATION STEPS
|
||||
#=================================================
|
||||
# RECREATE THE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Recreating the dedicated system user..." --weight=1
|
||||
ynh_script_progression --message="Reconfiguring the dedicated system user..." --weight=1
|
||||
|
||||
# Create the dedicated user (if not existing)
|
||||
# It could be created later by the deb, but it's cleaner here
|
||||
ynh_system_user_create --username=$app
|
||||
|
||||
if grep -q "^render:" /etc/group; then
|
||||
# Add user to render group
|
||||
adduser $app render
|
||||
|
@ -65,52 +27,19 @@ fi
|
|||
#=================================================
|
||||
# OPEN PORTS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring firewall..." --weight=1
|
||||
|
||||
discovery_service=$discovery
|
||||
discovery_client=$discovery
|
||||
|
||||
if [ $discovery -eq 1 ]; then
|
||||
ynh_script_progression --message="Configuring firewall..." --weight=1
|
||||
|
||||
# Open port $discovery_service_port for service auto-discovery
|
||||
if ynh_port_available --port=$discovery_service_port; then
|
||||
ynh_exec_warn_less yunohost firewall allow UDP $discovery_service_port
|
||||
else
|
||||
discovery_service=0
|
||||
ynh_print_warn --message="Port $discovery_service_port (for service auto-discovery) is not available. Continuing nonetheless."
|
||||
fi
|
||||
|
||||
# Open port $discovery_client_port for client auto-discovery
|
||||
if ynh_port_available --port=$discovery_client_port; then
|
||||
ynh_exec_warn_less yunohost firewall allow UDP $discovery_client_port
|
||||
else
|
||||
discovery_client=0
|
||||
ynh_print_warn --message="Port $discovery_client_port (for client auto-discovery) is not available. Continuing nonetheless."
|
||||
fi
|
||||
fi
|
||||
|
||||
ynh_app_setting_set --app=$app --key=discovery_service --value=$discovery_service
|
||||
ynh_app_setting_set --app=$app --key=discovery_client --value=$discovery_client
|
||||
open_jellyfin_discovery_ports
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE APP MAIN DIR
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the app main directory..." --weight=2
|
||||
|
||||
ynh_restore_file --origin_path="$final_path"
|
||||
ynh_restore_file --origin_path="$data_path"
|
||||
ynh_restore_file --origin_path="$config_path"
|
||||
ynh_restore_file --origin_path="/etc/default/jellyfin" --not_mandatory
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC RESTORATION
|
||||
#=================================================
|
||||
# REINSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reinstalling dependencies..." --weight=5
|
||||
|
||||
# Define and install dependencies
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
#=================================================
|
||||
# REINSTALL PACKAGES
|
||||
#=================================================
|
||||
|
@ -131,7 +60,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
|||
ynh_script_progression --message="Restoring user rights..."
|
||||
|
||||
# Restore permissions on app files
|
||||
chown -R $app: $final_path
|
||||
chown -R $app: $data_path
|
||||
chown -R $app: $config_path
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -9,20 +9,6 @@
|
|||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Loading installation settings..." --weight=1
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
||||
admin=$(ynh_app_setting_get --app=$app --key=admin)
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
config_path=$(ynh_app_setting_get --app=$app --key=config_path)
|
||||
port=$(ynh_app_setting_get --app=$app --key=port)
|
||||
discovery=$(ynh_app_setting_get --app=$app --key=discovery)
|
||||
|
||||
#=================================================
|
||||
# CHECK VERSION
|
||||
#=================================================
|
||||
|
@ -30,21 +16,6 @@ ynh_script_progression --message="Checking version..."
|
|||
|
||||
upgrade_type=$(ynh_check_app_version_changed)
|
||||
|
||||
#=================================================
|
||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=3
|
||||
|
||||
# Backup the current version of the app
|
||||
ynh_backup_before_upgrade
|
||||
ynh_clean_setup () {
|
||||
ynh_clean_check_starting
|
||||
# Restore it if the upgrade fails
|
||||
ynh_restore_upgradebackup
|
||||
}
|
||||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# STANDARD UPGRADE STEPS
|
||||
#=================================================
|
||||
|
@ -52,51 +23,31 @@ ynh_abort_if_errors
|
|||
#=================================================
|
||||
ynh_script_progression --message="Stopping a systemd service..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" --line_match="Stopped Jellyfin Media Server" --timeout=15
|
||||
ynh_systemd_action --service_name="$app" --action="stop" --log_path="systemd" --line_match="Stopped Jellyfin Media Server" --timeout=15
|
||||
|
||||
#=================================================
|
||||
# ENSURE DOWNWARD COMPATIBILITY
|
||||
#=================================================
|
||||
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
|
||||
|
||||
if [[ ! "$YNH_ARCH" =~ ^(amd64|arm64|armhf)$ ]]; then
|
||||
ynh_die "Jellyfin is not compatible with your architecture, $YNH_ARCH, which is neither amd64, arm64, or armhf." 1
|
||||
# If render group exists, and system user doesn't belong to it, add it
|
||||
if grep -q "^render:" /etc/group && ! id -Gn "$app" | grep -q '\brender\b'; then
|
||||
adduser "$app" render
|
||||
fi
|
||||
|
||||
# If path keys do not exist, create them
|
||||
# If config_path is mixed up with final_path, fix them
|
||||
# If config_path is mixed up with install_dir, fix them
|
||||
if [ -z "$config_path" ] || [[ $config_path = "/var/lib/jellyfin" ]]; then
|
||||
config_path=/etc/jellyfin
|
||||
final_path=/var/lib/jellyfin
|
||||
ynh_app_setting_set --app=$app --key=config_path --value=$config_path
|
||||
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||
ynh_app_setting_set --app="$app" --key=config_path --value=$config_path
|
||||
fi
|
||||
|
||||
# If render group exists, and system user doesn't belong to it, add it
|
||||
if [ $(grep -q "^render:" /etc/group) ] && [ ! $(id -Gn $app | grep -q '\brender\b') ]; then
|
||||
adduser $app render
|
||||
fi
|
||||
|
||||
# Cleaning legacy permissions
|
||||
if ynh_legacy_permissions_exists; then
|
||||
ynh_legacy_permissions_delete_all
|
||||
|
||||
ynh_app_setting_delete --app=$app --key=is_public
|
||||
fi
|
||||
|
||||
if ! ynh_permission_exists --permission="admin"; then
|
||||
# Create the required permissions
|
||||
ynh_permission_create --permission="admin" --auth_header=false --allowed=$admin
|
||||
fi
|
||||
|
||||
# Update SSO permissions with --auth_header=false (notably, for Jellyfin Vue)
|
||||
ynh_permission_url --permission="main" --auth_header=false
|
||||
ynh_permission_url --permission="admin" --auth_header=false
|
||||
ynh_app_setting_delete --app="$app" --key=is_public
|
||||
|
||||
# If discovery key does not exist, create it
|
||||
if [ -z "$discovery" ]; then
|
||||
if [ -z "${discovery:-}" ]; then
|
||||
discovery=0
|
||||
ynh_app_setting_set --app=$app --key=discovery --value=$discovery
|
||||
ynh_app_setting_set --app="$app" --key=discovery --value=$discovery
|
||||
fi
|
||||
|
||||
if [ ! -f "/etc/logrotate.d/$app" ]; then
|
||||
|
@ -130,26 +81,6 @@ fi
|
|||
ynh_app_setting_set --app=$app --key=discovery_service --value=$discovery_service
|
||||
ynh_app_setting_set --app=$app --key=discovery_client --value=$discovery_client
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1
|
||||
|
||||
# Create a dedicated user (if not existing)
|
||||
ynh_system_user_create --username=$app
|
||||
|
||||
if grep -q "^render:" /etc/group; then
|
||||
# Add user to render group
|
||||
adduser $app render
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# UPGRADE DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading dependencies..." --weight=5
|
||||
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
#=================================================
|
||||
# UPGRADE PACKAGES
|
||||
#=================================================
|
||||
|
@ -182,7 +113,7 @@ ynh_add_config --template="logging.json" --destination="$config_path/logging.jso
|
|||
#=================================================
|
||||
ynh_script_progression --message="Installing LDAP plugin..." --weight=2
|
||||
|
||||
ynh_setup_source --dest_dir="/var/lib/jellyfin/plugins/LDAP Authentication" --source_id=ldap
|
||||
ynh_setup_source --dest_dir="/var/lib/jellyfin/plugins/LDAP Authentication" --source_id=plugin_ldap
|
||||
mkdir -p /var/lib/jellyfin/plugins/configurations/
|
||||
ynh_add_config --template="LDAP-Auth.xml" --destination="/var/lib/jellyfin/plugins/configurations/LDAP-Auth.xml"
|
||||
|
||||
|
@ -191,7 +122,7 @@ ynh_add_config --template="LDAP-Auth.xml" --destination="/var/lib/jellyfin/plugi
|
|||
#=================================================
|
||||
|
||||
# Set permissions on app files
|
||||
chown -R $app: $final_path
|
||||
chown -R $app: $data_path
|
||||
chown -R $app: $config_path
|
||||
|
||||
#=================================================
|
||||
|
@ -228,13 +159,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1
|
|||
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Started Jellyfin Media Server" --timeout=15
|
||||
|
||||
#=================================================
|
||||
# RELOAD NGINX
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reloading NGINX web server..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
|
15
tests.toml
Normal file
15
tests.toml
Normal file
|
@ -0,0 +1,15 @@
|
|||
#:schema https://raw.githubusercontent.com/YunoHost/apps/master/schemas/tests.v1.schema.json
|
||||
|
||||
test_format = 1.0
|
||||
|
||||
[default]
|
||||
|
||||
preinstall = """
|
||||
sudo apt update >/dev/null
|
||||
"""
|
||||
|
||||
args.admin = "john"
|
||||
|
||||
test_upgrade_from.384dcd2ff1dbf4b0085edb7f12e4d15f00508e2b.name = "10.8.0_ynh1"
|
||||
test_upgrade_from.384dcd2ff1dbf4b0085edb7f12e4d15f00508e2b.args.domain = "domain.tld"
|
||||
test_upgrade_from.384dcd2ff1dbf4b0085edb7f12e4d15f00508e2b.args.admin = "john"
|
Loading…
Add table
Reference in a new issue