1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/jellyfin_ynh.git synced 2024-09-03 19:26:29 +02:00

Fix restore with debian.architecture sources

This commit is contained in:
tituspijean 2022-02-15 21:42:40 +00:00 committed by Félix Piédallu
parent 0db61d1ea7
commit 87379b6c76

View file

@ -123,20 +123,20 @@ ynh_script_progression --message="Reinstalling packages..." --weight=7
tempdir="$(mktemp -d)"
# Download the deb files
ynh_setup_source --dest_dir=$tempdir --source_id="ffmpeg.$architecture"
ynh_setup_source --dest_dir=$tempdir --source_id="ffmpeg.$debian.$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=' "../settings/conf/server.$debian.$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="../settings/conf/server.$debian.$architecture.src"
fi
ynh_setup_source --dest_dir=$tempdir --source_id="server.$architecture"
ynh_setup_source --dest_dir=$tempdir --source_id="server.$debian.$architecture"
# Same for web
src_url=$(grep 'SOURCE_URL=' "../settings/conf/web.$debian.$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="../settings/conf/web.$debian.$architecture.src"
fi
ynh_setup_source --dest_dir=$tempdir --source_id="web.$architecture"
ynh_setup_source --dest_dir=$tempdir --source_id="web.$debian.$architecture"
# Install the packages
ynh_exec_warn_less dpkg --force-confdef --force-confold -i $tempdir/jellyfin-ffmpeg.deb