From 232973c548b3ecf511ff6e9a3c4cba19d6a1a3f1 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Mon, 13 Dec 2021 14:52:23 +0100 Subject: [PATCH 01/12] fix url of old versions --- scripts/install | 11 +++++++++++ scripts/restore | 11 +++++++++++ scripts/upgrade | 11 +++++++++++ 3 files changed, 33 insertions(+) diff --git a/scripts/install b/scripts/install index 3466d03..3d7e65d 100644 --- a/scripts/install +++ b/scripts/install @@ -108,7 +108,18 @@ tempdir="$(mktemp -d)" # Download the deb files ynh_setup_source --dest_dir=$tempdir --source_id="ffmpeg.$architecture" +# 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_$architecture.deb to https://repo.jellyfin.org/archive/debian/stable/X.X.X/server/jellyfin-server_X.X.X-1_$architecture.deb +src_url=$(grep 'SOURCE_URL=' "../conf/server.$architecture.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/server/$version/jellyfin-server_$version-1_$architecture.deb" --replace_string="archive/debian/stable/$version/server/jellyfin-server_$version-1_$architecture.deb" --target_file="../conf/server.$architecture.src" +fi ynh_setup_source --dest_dir=$tempdir --source_id="server.$architecture" + +# Same for web +src_url=$(grep 'SOURCE_URL=' "../conf/web.$architecture.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/web/$version/jellyfin-web_$version-1_all.deb" --replace_string="archive/debian/stable/$version/web/jellyfin-web_$version-1_all.deb" --target_file="../conf/web.$architecture.src" +fi ynh_setup_source --dest_dir=$tempdir --source_id="web.$architecture" # Install the packages diff --git a/scripts/restore b/scripts/restore index b2e9f84..3280425 100644 --- a/scripts/restore +++ b/scripts/restore @@ -116,7 +116,18 @@ tempdir="$(mktemp -d)" # Download the deb files ynh_setup_source --dest_dir=$tempdir --source_id="ffmpeg.$architecture" +# 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_$architecture.deb to https://repo.jellyfin.org/archive/debian/stable/X.X.X/server/jellyfin-server_X.X.X-1_$architecture.deb +src_url=$(grep 'SOURCE_URL=' "../conf/server.$architecture.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/server/$version/jellyfin-server_$version-1_$architecture.deb" --replace_string="archive/debian/stable/$version/server/jellyfin-server_$version-1_$architecture.deb" --target_file="../conf/server.$architecture.src" +fi ynh_setup_source --dest_dir=$tempdir --source_id="server.$architecture" + +# Same for web +src_url=$(grep 'SOURCE_URL=' "../conf/web.$architecture.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/web/$version/jellyfin-web_$version-1_all.deb" --replace_string="archive/debian/stable/$version/web/jellyfin-web_$version-1_all.deb" --target_file="../conf/web.$architecture.src" +fi ynh_setup_source --dest_dir=$tempdir --source_id="web.$architecture" # Install the packages diff --git a/scripts/upgrade b/scripts/upgrade index ce19637..13747c5 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -144,7 +144,18 @@ tempdir="$(mktemp -d)" # Download the deb files ynh_setup_source --dest_dir=$tempdir --source_id="ffmpeg.$architecture" +# 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_$architecture.deb to https://repo.jellyfin.org/archive/debian/stable/X.X.X/server/jellyfin-server_X.X.X-1_$architecture.deb +src_url=$(grep 'SOURCE_URL=' "../conf/server.$architecture.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/server/$version/jellyfin-server_$version-1_$architecture.deb" --replace_string="archive/debian/stable/$version/server/jellyfin-server_$version-1_$architecture.deb" --target_file="../conf/server.$architecture.src" +fi ynh_setup_source --dest_dir=$tempdir --source_id="server.$architecture" + +# Same for web +src_url=$(grep 'SOURCE_URL=' "../conf/web.$architecture.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/web/$version/jellyfin-web_$version-1_all.deb" --replace_string="archive/debian/stable/$version/web/jellyfin-web_$version-1_all.deb" --target_file="../conf/web.$architecture.src" +fi ynh_setup_source --dest_dir=$tempdir --source_id="web.$architecture" # Install the packages From 65d39036a26286ffba1da17b6805d584a6d9722c Mon Sep 17 00:00:00 2001 From: Kay0u Date: Mon, 13 Dec 2021 14:52:59 +0100 Subject: [PATCH 02/12] add pkg_dependencies --- scripts/_common.sh | 4 ++++ scripts/install | 15 +++++++++++---- scripts/remove | 15 +++++++++++---- scripts/restore | 16 ++++++++++++---- scripts/upgrade | 15 +++++++++++---- 5 files changed, 49 insertions(+), 16 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 2995370..be01c38 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -16,6 +16,10 @@ architecture=$(dpkg --print-architecture) discovery_service_port=1900 discovery_client_port=7359 +ffmpeg_deps="libass9 libbluray2 libc6 libdrm-intel1 libdrm2 libfontconfig1 libfreetype6 libfribidi0 libgcc1 libgmp10 libgnutls30 libmp3lame0 libopus0 libstdc++6 libtheora0 libvdpau1 libvorbis0a libvorbisenc2 libvpx5 libwebp6 libwebpmux3 libx11-6 libx264-155 libx265-165 libzvbi0 libopencl1 zlib1g" +jellyfin_deps="at libsqlite3-0 libfontconfig1 libfreetype6 libssl1.1" +pkg_dependencies="$ffmpeg_deps $jellyfin_deps" + #================================================= # PERSONAL HELPERS #================================================= diff --git a/scripts/install b/scripts/install index 3d7e65d..a928f1e 100644 --- a/scripts/install +++ b/scripts/install @@ -101,7 +101,14 @@ ynh_app_setting_set --app=$app --key=discovery_client --value=$discovery_client #================================================= # INSTALL DEPENDENCIES #================================================= -ynh_script_progression --message="Installing dependencies..." --weight=1 +ynh_script_progression --message="Installing dependencies..." --weight=5 + +ynh_install_app_dependencies $pkg_dependencies + +#================================================= +# INSTALL PACKAGES +#================================================= +ynh_script_progression --message="Installing packages..." --weight=1 # Create the temporary directory tempdir="$(mktemp -d)" @@ -123,9 +130,9 @@ fi ynh_setup_source --dest_dir=$tempdir --source_id="web.$architecture" # Install the packages -ynh_exec_warn_less apt-get -f install $tempdir/jellyfin-ffmpeg.deb -y -ynh_exec_warn_less apt-get -f install $tempdir/jellyfin-server.deb -y -ynh_exec_warn_less apt-get -f install $tempdir/jellyfin-web.deb -y +ynh_exec_warn_less dpkg -i $tempdir/jellyfin-ffmpeg.deb +ynh_exec_warn_less dpkg -i $tempdir/jellyfin-server.deb +ynh_exec_warn_less dpkg -i $tempdir/jellyfin-web.deb #================================================= # NGINX CONFIGURATION diff --git a/scripts/remove b/scripts/remove index ad0998e..63a7177 100644 --- a/scripts/remove +++ b/scripts/remove @@ -38,11 +38,18 @@ fi #================================================= # REMOVE DEPENDENCIES #================================================= -ynh_script_progression --message="Removing dependencies..." --weight=1 +ynh_script_progression --message="Removing dependencies" --weight=3 -apt-get remove jellyfin-web -y -apt-get remove jellyfin-server -y -apt-get remove jellyfin-ffmpeg -y +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-ffmpeg #================================================= # REMOVE APP DIRECTORIES diff --git a/scripts/restore b/scripts/restore index 3280425..ec2c518 100644 --- a/scripts/restore +++ b/scripts/restore @@ -109,7 +109,15 @@ ynh_system_user_create --username=$app #================================================= # REINSTALL DEPENDENCIES #================================================= -ynh_script_progression --message="Reinstalling dependencies..." --weight=7 +ynh_script_progression --message="Reinstalling dependencies..." --weight=5 + +# Define and install dependencies +ynh_install_app_dependencies $pkg_dependencies + +#================================================= +# REINSTALL PACKAGES +#================================================= +ynh_script_progression --message="Reinstalling packages..." --weight=7 # Create the temporary directory tempdir="$(mktemp -d)" @@ -131,9 +139,9 @@ fi ynh_setup_source --dest_dir=$tempdir --source_id="web.$architecture" # Install the packages -ynh_exec_warn_less apt-get -f install $tempdir/jellyfin-ffmpeg.deb -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold -ynh_exec_warn_less apt-get -f install $tempdir/jellyfin-server.deb -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold -ynh_exec_warn_less apt-get -f install $tempdir/jellyfin-web.deb -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold +ynh_exec_warn_less dpkg -i $tempdir/jellyfin-ffmpeg.deb --force-confdef --force-confold +ynh_exec_warn_less dpkg -i $tempdir/jellyfin-server.deb --force-confdef --force-confold +ynh_exec_warn_less dpkg -i $tempdir/jellyfin-web.deb --force-confdef --force-confold #================================================= # RESTORE SYSTEMD diff --git a/scripts/upgrade b/scripts/upgrade index 13747c5..f7ac544 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -137,7 +137,14 @@ ynh_add_nginx_config #================================================= # UPGRADE DEPENDENCIES #================================================= -ynh_script_progression --message="Upgrading dependencies..." --weight=3 +ynh_script_progression --message="Upgrading dependencies..." --weight=5 + +ynh_install_app_dependencies $pkg_dependencies + +#================================================= +# UPGRADE packages +#================================================= +ynh_script_progression --message="Upgrading packages..." --weight=3 # Create the temporary directory tempdir="$(mktemp -d)" @@ -159,9 +166,9 @@ fi ynh_setup_source --dest_dir=$tempdir --source_id="web.$architecture" # Install the packages -ynh_exec_warn_less apt-get -f install $tempdir/jellyfin-ffmpeg.deb -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confnew -ynh_exec_warn_less apt-get -f install $tempdir/jellyfin-server.deb -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confnew -ynh_exec_warn_less apt-get -f install $tempdir/jellyfin-web.deb -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confnew +ynh_exec_warn_less dpkg -i $tempdir/jellyfin-ffmpeg.deb --force-confdef --force-confnew +ynh_exec_warn_less dpkg -i $tempdir/jellyfin-server.deb --force-confdef --force-confnew +ynh_exec_warn_less dpkg -i $tempdir/jellyfin-web.deb --force-confdef --force-confnew #================================================= # CREATE DEDICATED USER From 96cb21fff833bec88698abd7ae3f0914a9732d40 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Mon, 13 Dec 2021 14:53:13 +0100 Subject: [PATCH 03/12] bump ldap plugin --- conf/ldap.src | 4 ++-- scripts/_common.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/ldap.src b/conf/ldap.src index cb0025b..aeee6fe 100644 --- a/conf/ldap.src +++ b/conf/ldap.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://repo.jellyfin.org/releases/plugin/ldap-authentication/ldap-authentication_12.0.0.0.zip -SOURCE_SUM=e3ef05fdb0cce145504a34595aefe568e47964e981017d9ccb87f39e58fff861 +SOURCE_URL=https://repo.jellyfin.org/releases/plugin/ldap-authentication/ldap-authentication_14.0.0.0.zip +SOURCE_SUM=7e09c87b698b3315357139468ec601b1395b2e88cb940c20d3e716f9bf48a37c SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=false diff --git a/scripts/_common.sh b/scripts/_common.sh index be01c38..398d363 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -9,7 +9,7 @@ pkg_version="10.7.7-1" version=$(echo "$pkg_version" | cut -d '-' -f 1) ffmpeg_pkg_version="4.3.2-1" -ldap_pkg_version="12.0.0.0" +ldap_pkg_version="14.0.0.0" architecture=$(dpkg --print-architecture) From cb09f4ec353195aaa0a5e27ed76e3e416ef45ff5 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Mon, 13 Dec 2021 14:55:10 +0100 Subject: [PATCH 04/12] ... --- scripts/remove | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/remove b/scripts/remove index 63a7177..31c288c 100644 --- a/scripts/remove +++ b/scripts/remove @@ -38,7 +38,7 @@ fi #================================================= # REMOVE DEPENDENCIES #================================================= -ynh_script_progression --message="Removing dependencies" --weight=3 +ynh_script_progression --message="Removing dependencies..." --weight=3 ynh_remove_app_dependencies From b7203a166ac523e7204ffc53da60bc0d9efc5c0c Mon Sep 17 00:00:00 2001 From: Kay0u Date: Mon, 13 Dec 2021 15:28:11 +0100 Subject: [PATCH 05/12] fix conf path in restore script --- scripts/restore | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/restore b/scripts/restore index ec2c518..2bda156 100644 --- a/scripts/restore +++ b/scripts/restore @@ -125,16 +125,16 @@ tempdir="$(mktemp -d)" # Download the deb files ynh_setup_source --dest_dir=$tempdir --source_id="ffmpeg.$architecture" # 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_$architecture.deb to https://repo.jellyfin.org/archive/debian/stable/X.X.X/server/jellyfin-server_X.X.X-1_$architecture.deb -src_url=$(grep 'SOURCE_URL=' "../conf/server.$architecture.src" | cut -d= -f2-) +src_url=$(grep 'SOURCE_URL=' "../settings/conf/server.$architecture.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/server/$version/jellyfin-server_$version-1_$architecture.deb" --replace_string="archive/debian/stable/$version/server/jellyfin-server_$version-1_$architecture.deb" --target_file="../conf/server.$architecture.src" + ynh_replace_string --match_string="releases/server/debian/versions/stable/server/$version/jellyfin-server_$version-1_$architecture.deb" --replace_string="archive/debian/stable/$version/server/jellyfin-server_$version-1_$architecture.deb" --target_file="../settings/conf/server.$architecture.src" fi ynh_setup_source --dest_dir=$tempdir --source_id="server.$architecture" # Same for web -src_url=$(grep 'SOURCE_URL=' "../conf/web.$architecture.src" | cut -d= -f2-) +src_url=$(grep 'SOURCE_URL=' "../settings/conf/web.$architecture.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/web/$version/jellyfin-web_$version-1_all.deb" --replace_string="archive/debian/stable/$version/web/jellyfin-web_$version-1_all.deb" --target_file="../conf/web.$architecture.src" + ynh_replace_string --match_string="releases/server/debian/versions/stable/web/$version/jellyfin-web_$version-1_all.deb" --replace_string="archive/debian/stable/$version/web/jellyfin-web_$version-1_all.deb" --target_file="../settings/conf/web.$architecture.src" fi ynh_setup_source --dest_dir=$tempdir --source_id="web.$architecture" From 76c751668f2dc8cc54c30d58862100c43e3294a8 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Mon, 13 Dec 2021 15:28:23 +0100 Subject: [PATCH 06/12] fix dpkg options --- scripts/restore | 6 +++--- scripts/upgrade | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/restore b/scripts/restore index 2bda156..f04d7fe 100644 --- a/scripts/restore +++ b/scripts/restore @@ -139,9 +139,9 @@ fi ynh_setup_source --dest_dir=$tempdir --source_id="web.$architecture" # Install the packages -ynh_exec_warn_less dpkg -i $tempdir/jellyfin-ffmpeg.deb --force-confdef --force-confold -ynh_exec_warn_less dpkg -i $tempdir/jellyfin-server.deb --force-confdef --force-confold -ynh_exec_warn_less dpkg -i $tempdir/jellyfin-web.deb --force-confdef --force-confold +ynh_exec_warn_less dpkg --force-confdef --force-confold -i $tempdir/jellyfin-ffmpeg.deb +ynh_exec_warn_less dpkg --force-confdef --force-confold -i $tempdir/jellyfin-server.deb +ynh_exec_warn_less dpkg --force-confdef --force-confold -i $tempdir/jellyfin-web.deb #================================================= # RESTORE SYSTEMD diff --git a/scripts/upgrade b/scripts/upgrade index f7ac544..74ae232 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -166,9 +166,9 @@ fi ynh_setup_source --dest_dir=$tempdir --source_id="web.$architecture" # Install the packages -ynh_exec_warn_less dpkg -i $tempdir/jellyfin-ffmpeg.deb --force-confdef --force-confnew -ynh_exec_warn_less dpkg -i $tempdir/jellyfin-server.deb --force-confdef --force-confnew -ynh_exec_warn_less dpkg -i $tempdir/jellyfin-web.deb --force-confdef --force-confnew +ynh_exec_warn_less dpkg --force-confdef --force-confnew -i $tempdir/jellyfin-ffmpeg.deb +ynh_exec_warn_less dpkg --force-confdef --force-confnew -i $tempdir/jellyfin-server.deb +ynh_exec_warn_less dpkg --force-confdef --force-confnew -i $tempdir/jellyfin-web.deb #================================================= # CREATE DEDICATED USER From af742c43496067c500304a53c271b5142aa16853 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sat, 22 Jan 2022 14:31:26 +0000 Subject: [PATCH 07/12] LDAP plugin v14 is not compatible with current version. Rolling back. --- conf/ldap.src | 4 ++-- scripts/_common.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/ldap.src b/conf/ldap.src index aeee6fe..cb0025b 100644 --- a/conf/ldap.src +++ b/conf/ldap.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://repo.jellyfin.org/releases/plugin/ldap-authentication/ldap-authentication_14.0.0.0.zip -SOURCE_SUM=7e09c87b698b3315357139468ec601b1395b2e88cb940c20d3e716f9bf48a37c +SOURCE_URL=https://repo.jellyfin.org/releases/plugin/ldap-authentication/ldap-authentication_12.0.0.0.zip +SOURCE_SUM=e3ef05fdb0cce145504a34595aefe568e47964e981017d9ccb87f39e58fff861 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=false diff --git a/scripts/_common.sh b/scripts/_common.sh index 398d363..be01c38 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -9,7 +9,7 @@ pkg_version="10.7.7-1" version=$(echo "$pkg_version" | cut -d '-' -f 1) ffmpeg_pkg_version="4.3.2-1" -ldap_pkg_version="14.0.0.0" +ldap_pkg_version="12.0.0.0" architecture=$(dpkg --print-architecture) From cc2a61acff6275cc40b06e040357dbc5503568db Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sat, 22 Jan 2022 14:32:18 +0000 Subject: [PATCH 08/12] Fixing dependencies for ARM64 --- scripts/_common.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index be01c38..3f135a0 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -16,7 +16,12 @@ architecture=$(dpkg --print-architecture) discovery_service_port=1900 discovery_client_port=7359 -ffmpeg_deps="libass9 libbluray2 libc6 libdrm-intel1 libdrm2 libfontconfig1 libfreetype6 libfribidi0 libgcc1 libgmp10 libgnutls30 libmp3lame0 libopus0 libstdc++6 libtheora0 libvdpau1 libvorbis0a libvorbisenc2 libvpx5 libwebp6 libwebpmux3 libx11-6 libx264-155 libx265-165 libzvbi0 libopencl1 zlib1g" +if [ $architecture == "arm64" ]; then + ffmpeg_deps="libass9 libbluray2 libc6 libdrm2 libfontconfig1 libfreetype6 libfribidi0 libgcc1 libgmp10 libgnutls30 libmp3lame0 libopus0 libstdc++6 libtheora0 libvdpau1 libvorbis0a libvorbisenc2 libvpx5 libwebp6 libwebpmux3 libx11-6 libx264-155 libx265-165 libzvbi0 zlib1g" +else + ffmpeg_deps="libass9 libbluray2 libc6 libdrm-intel1 libdrm2 libfontconfig1 libfreetype6 libfribidi0 libgcc1 libgmp10 libgnutls30 libmp3lame0 libopus0 libstdc++6 libtheora0 libvdpau1 libvorbis0a libvorbisenc2 libvpx5 libwebp6 libwebpmux3 libx11-6 libx264-155 libx265-165 libzvbi0 libopencl1 zlib1g" +fi + jellyfin_deps="at libsqlite3-0 libfontconfig1 libfreetype6 libssl1.1" pkg_dependencies="$ffmpeg_deps $jellyfin_deps" From 913f46cf5a710759bc0892d81b02b0ba63689f5c Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sat, 22 Jan 2022 14:35:48 +0000 Subject: [PATCH 09/12] Simplify configuration files --- scripts/install | 29 ++++------------------------- scripts/upgrade | 40 +++++----------------------------------- 2 files changed, 9 insertions(+), 60 deletions(-) diff --git a/scripts/install b/scripts/install index a928f1e..d0e2cce 100644 --- a/scripts/install +++ b/scripts/install @@ -160,32 +160,11 @@ fi #================================================= ynh_script_progression --message="Configuring the settings..." --weight=1 -# Set permissions to app files -chown -R $app: $final_path - -# Load services once to generate system.xml -ynh_systemd_action --service_name=$app --action="restart" --log_path="systemd" --line_match="Started Jellyfin Media Server" --timeout=15 ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" --line_match="Stopped Jellyfin Media Server" --timeout=15 -# Port config -ynh_replace_string --match_string="8096" --replace_string="$port" --target_file="$config_path/network.xml" -ynh_replace_string --match_string="8096" --replace_string="$port" --target_file="$config_path/network.xml" - -# Enable IPv6 -ynh_replace_string --match_string="false" --replace_string="true" --target_file="$config_path/network.xml" - -# BaseUrl config -ynh_replace_string --match_string="" --replace_string="$path_url" --target_file="$config_path/network.xml" - -# Disable Setup Wizard -ynh_replace_string --match_string="false" --replace_string="true" --target_file="$config_path/system.xml" - -# Lower logging verbosity -cp "$config_path/logging.default.json" "$config_path/logging.json" -ynh_replace_string --match_string="\"Default\": \"Information\"" --replace_string="\"Default\": \"Error\"" --target_file="$config_path/logging.json" - -ynh_store_file_checksum --file="$config_path/network.xml" -ynh_store_file_checksum --file="$config_path/system.xml" +ynh_add_config --template="system.xml" --destination="$config_path/system.xml" +ynh_add_config --template="network.xml" --destination="$config_path/network.xml" +ynh_add_config --template="logging.json" --destination="$config_path/logging.json" #================================================= # INSTALL LDAP PLUGIN @@ -194,7 +173,7 @@ ynh_script_progression --message="Installing LDAP plugin..." --weight=2 ynh_setup_source --dest_dir="/var/lib/jellyfin/plugins/LDAP Authentication" --source_id=ldap mkdir -p /var/lib/jellyfin/plugins/configurations/ -ynh_add_config --template="../conf/LDAP-Auth.xml" --destination="/var/lib/jellyfin/plugins/configurations/LDAP-Auth.xml" +ynh_add_config --template="LDAP-Auth.xml" --destination="/var/lib/jellyfin/plugins/configurations/LDAP-Auth.xml" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index 74ae232..0bbfc4e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -181,41 +181,11 @@ ynh_system_user_create --username=$app #================================================= # MODIFY A CONFIG FILE #================================================= +ynh_script_progression --message="Setting up configuration files..." --weight=2 -# Check if network.xml exists (introduced in v10.7) -if [ -f "/etc/jellyfin/network.xml" ]; then - ynh_script_progression --message="Configuring the settings..." --weight=1 - - ynh_backup_if_checksum_is_different --file="$config_path/network.xml" - ynh_backup_if_checksum_is_different --file="$config_path/system.xml" - - # Set permissions to app files - chown -R $app: $final_path - - # Load services once to generate network.xml - ynh_systemd_action --service_name=$app --action="restart" --log_path="systemd" --line_match="Started Jellyfin Media Server" --timeout=15 - ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" --line_match="Stopped Jellyfin Media Server" --timeout=15 - - # Port config - ynh_replace_string --match_string="8096" --replace_string="$port" --target_file="$config_path/network.xml" - ynh_replace_string --match_string="8096" --replace_string="$port" --target_file="$config_path/network.xml" - - # Enable IPv6 - ynh_replace_string --match_string="false" --replace_string="true" --target_file="$config_path/network.xml" - - # BaseUrl config - ynh_replace_string --match_string="" --replace_string="$path_url" --target_file="$config_path/network.xml" - - ynh_store_file_checksum --file="$config_path/network.xml" - ynh_store_file_checksum --file="$config_path/system.xml" -fi - -# Lower logging verbosity -# But first, if missing, copy it from its template -if [ ! -f "$config_path/logging.json" ]; then - cp "$config_path/logging.default.json" "$config_path/logging.json" -fi -ynh_exec_fully_quiet ynh_replace_string --match_string="\"Default\": \"Information\"" --replace_string="\"Default\": \"Error\"" --target_file="$config_path/logging.json" +ynh_add_config --template="system.xml" --destination="$config_path/system.xml" +ynh_add_config --template="network.xml" --destination="$config_path/network.xml" +ynh_add_config --template="logging.json" --destination="$config_path/logging.json" #================================================= # INSTALL LDAP PLUGIN @@ -224,7 +194,7 @@ ynh_script_progression --message="Installing LDAP plugin..." --weight=2 ynh_setup_source --dest_dir="/var/lib/jellyfin/plugins/LDAP Authentication" --source_id=ldap mkdir -p /var/lib/jellyfin/plugins/configurations/ -ynh_add_config --template="../conf/LDAP-Auth.xml" --destination="/var/lib/jellyfin/plugins/configurations/LDAP-Auth.xml" +ynh_add_config --template="LDAP-Auth.xml" --destination="/var/lib/jellyfin/plugins/configurations/LDAP-Auth.xml" #================================================= # GENERIC FINALIZATION From bc272cfd47d5a6c31b61c4cfdfe2bc736fd7204c Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sat, 22 Jan 2022 14:36:54 +0000 Subject: [PATCH 10/12] No need to backup service file, it's included in deb files --- scripts/backup | 1 - scripts/restore | 1 - 2 files changed, 2 deletions(-) diff --git a/scripts/backup b/scripts/backup index aa00def..18038d9 100644 --- a/scripts/backup +++ b/scripts/backup @@ -61,7 +61,6 @@ ynh_backup --src_path="/etc/logrotate.d/$app" #================================================= ynh_backup --src_path="/etc/systemd/system/jellyfin.service.d" --not_mandatory -ynh_backup --src_path="/lib/systemd/system/jellyfin.service" #================================================= # BACKUP VARIOUS FILES diff --git a/scripts/restore b/scripts/restore index f04d7fe..2d796bb 100644 --- a/scripts/restore +++ b/scripts/restore @@ -149,7 +149,6 @@ ynh_exec_warn_less dpkg --force-confdef --force-confold -i $tempdir/jellyfin-web ynh_script_progression --message="Restoring the systemd configuration..." --weight=1 ynh_restore_file --origin_path="/etc/systemd/system/jellyfin.service.d" --not_mandatory -ynh_restore_file --origin_path="/lib/systemd/system/jellyfin.service" systemctl enable jellyfin.service --quiet #================================================= From 83b7b08d9a15b5186ee978737cf88e6e332f11ea Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sat, 22 Jan 2022 15:22:48 +0000 Subject: [PATCH 11/12] Add the configuration files... --- conf/logging.json | 38 +++++++++ conf/network.xml | 35 +++++++++ conf/system.xml | 195 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 268 insertions(+) create mode 100644 conf/logging.json create mode 100644 conf/network.xml create mode 100644 conf/system.xml diff --git a/conf/logging.json b/conf/logging.json new file mode 100644 index 0000000..359bfa4 --- /dev/null +++ b/conf/logging.json @@ -0,0 +1,38 @@ +{ + "Serilog": { + "MinimumLevel": { + "Default": "Error", + "Override": { + "Microsoft": "Warning", + "System": "Warning" + } + }, + "WriteTo": [ + { + "Name": "Console", + "Args": { + "outputTemplate": "[{Timestamp:HH:mm:ss}] [{Level:u3}] [{ThreadId}] {SourceContext}: {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "Async", + "Args": { + "configure": [ + { + "Name": "File", + "Args": { + "path": "%JELLYFIN_LOG_DIR%//log_.log", + "rollingInterval": "Day", + "retainedFileCountLimit": 3, + "rollOnFileSizeLimit": true, + "fileSizeLimitBytes": 100000000, + "outputTemplate": "[{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz}] [{Level:u3}] [{ThreadId}] {SourceContext}: {Message}{NewLine}{Exception}" + } + } + ] + } + } + ], + "Enrich": [ "FromLogContext", "WithThreadId" ] + } +} diff --git a/conf/network.xml b/conf/network.xml new file mode 100644 index 0000000..1d60af9 --- /dev/null +++ b/conf/network.xml @@ -0,0 +1,35 @@ + + + false + + + __PATH__ + 8920 + __PORT__ + 8920 + false + __PORT__ + false + + true + true + false + + 2 + 100 + true + vEthernet* + 60 + false + + + false + true + + false + true + true + + + + diff --git a/conf/system.xml b/conf/system.xml new file mode 100644 index 0000000..6e2ed94 --- /dev/null +++ b/conf/system.xml @@ -0,0 +1,195 @@ + + + 3 + true + true + false + __PORT__ + false + + true + true + false + + 2 + 100 + true + vEthernet* + 60 + false + + + false + true + 8920 + __PORT__ + 8920 + false + true + + + true + false + true + true + true + + + en + US + + . + + + % + + + , + & + - + { + } + ' + + + the + a + an + + 5 + 90 + 300 + 5 + 5 + 60 + true + Legacy + + + Book + + + + + + + + + Movie + + + + + + + + + MusicVideo + + + + The Open Movie Database + + + + The Open Movie Database + + + + + Series + + + + + + + + + MusicAlbum + + + + TheAudioDB + + + + + + + MusicArtist + + + + TheAudioDB + + + + + + + BoxSet + + + + + + + + + Season + + + + + + + + + Episode + + + + + + + + + true + + + en-US + false + + 0 + false + false + true + + + + + + Jellyfin Stable + https://repo.jellyfin.org/releases/plugin/manifest-stable.json + true + + + true + false + true + + false + 0 + + + true + 500 + + * + + + 30 + 0 + 0 + false + From d196b947b33030b00989f258346be28a29021fa2 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sat, 22 Jan 2022 17:02:38 +0000 Subject: [PATCH 12/12] Update check_process --- check_process | 36 ++++++------------------------------ 1 file changed, 6 insertions(+), 30 deletions(-) diff --git a/check_process b/check_process index c1fd17c..f2acfeb 100644 --- a/check_process +++ b/check_process @@ -1,14 +1,12 @@ # See here for more information # https://github.com/YunoHost/package_check#syntax-check_process-file -# Move this file from check_process.default to check_process when you have filled it. - ;; Test complet ; Manifest - domain="domain.tld" (DOMAIN) - path="/path" (PATH) - admin="john" (USER) - is_public=1 (PUBLIC|public=1|private=0) + domain="domain.tld" + path="/path" + admin="john" + is_public=1 discovery=1 ; Checks pkg_linter=1 @@ -18,18 +16,6 @@ setup_private=1 setup_public=1 upgrade=1 - # 10.6.4~ynh1 - #upgrade=1 from_commit=dc5ab412fe599ce6d558c2f55fe53d2c21956c08 - # 10.6.4~ynh2 - #upgrade=1 from_commit=2aab8003d64ffabe65bd11ebe5933cfef519b061 - # 10.6.4~ynh3 - #upgrade=1 from_commit=5478712c0ca7683503bc1b50cfafe81ea508065e - # 10.7.0~ynh1 - #upgrade=1 from_commit=63ab03ab79cc088a52b8a36fb4fdf5918bf0e14b - # 10.7.5~ynh1 - #upgrade=1 from_commit=8ed403b30a8d3e61e2d3bf5bc8d3f4cae1ed80b6 - # 10.7.6~ynh1 - upgrade=1 from_commit=227b2cb8661b59ba391802637d0893976ffb6dd4 backup_restore=1 multi_instance=0 port_already_use=0 @@ -38,15 +24,5 @@ Email= Notification=none ;;; Upgrade options - ; commit=dc5ab412fe599ce6d558c2f55fe53d2c21956c08 - name=10.6.4~ynh1 - ; commit=2aab8003d64ffabe65bd11ebe5933cfef519b061 - name=10.6.4~ynh2 - ; commit=5478712c0ca7683503bc1b50cfafe81ea508065e - name=10.6.4~ynh3 - ; commit=63ab03ab79cc088a52b8a36fb4fdf5918bf0e14b - name=10.7.0~ynh1 - ; commit=8ed403b30a8d3e61e2d3bf5bc8d3f4cae1ed80b6 - name=10.7.5~ynh1 - ; commit=227b2cb8661b59ba391802637d0893976ffb6dd4 - name=10.7.6~ynh1 +# ; commit= +# name=