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

add pkg_dependencies

This commit is contained in:
Kay0u 2021-12-13 14:52:59 +01:00
parent 232973c548
commit 65d39036a2
No known key found for this signature in database
GPG key ID: AAFEEB16CFA2AE2D
5 changed files with 49 additions and 16 deletions

View file

@ -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
#=================================================

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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