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

Skip apt-get's config file questions during restore

This commit is contained in:
tituspijean 2021-04-23 23:27:20 +02:00
parent 7f43e1daa4
commit f44dd068ad
2 changed files with 10 additions and 13 deletions

View file

@ -103,9 +103,9 @@ ynh_setup_source_2 --dest_dir=$tempdir --source_id=server
ynh_setup_source_2 --dest_dir=$tempdir --source_id=web
# 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 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
#=================================================
# INTEGRATE SERVICE IN YUNOHOST

View file

@ -47,13 +47,6 @@ if [ -z "$config_path" ]; then
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
fi
# If logging config does not exist, lower logging verbosity
if ! [ -e "$config_path/logging.json" ]; then
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"
fi
# Cleaning legacy permissions
if ynh_legacy_permissions_exists; then
ynh_legacy_permissions_delete_all
@ -116,9 +109,9 @@ ynh_setup_source_2 --dest_dir=$tempdir --source_id=server
ynh_setup_source_2 --dest_dir=$tempdir --source_id=web
# 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 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
#=================================================
# CREATE DEDICATED USER
@ -154,6 +147,10 @@ if [ -z "/etc/jellyfin/network.xml" ]; then
ynh_store_file_checksum --file="$config_path/system.xml"
fi
# 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"
#=================================================
# INSTALL LDAP PLUGIN
#=================================================