mirror of
https://github.com/YunoHost-Apps/jellyfin_ynh.git
synced 2024-09-03 19:26:29 +02:00
Installation of deb packages will overwrite the configuration files, so to prevent a warning we backup those files beforehand.
This commit is contained in:
parent
635be8261a
commit
6bc45775a0
1 changed files with 12 additions and 0 deletions
|
@ -86,6 +86,12 @@ ynh_app_setting_set --app=$app --key=discovery_client --value=$discovery_client
|
|||
#=================================================
|
||||
ynh_script_progression --message="Upgrading packages..." --weight=3
|
||||
|
||||
# Backup the configuration files to prevent yunohost to see a manual edit
|
||||
bakdir=$(mktemp -d)
|
||||
for name in system.xml network.xml logging.json; do
|
||||
cp "$config_path/$name" "$bakdir/$name"
|
||||
done
|
||||
|
||||
# ynh_package_install passes --no-remove so the ffmpeg5 -> ffmpeg6 migration is blocked.
|
||||
# So we remove the packages before installing the new ones.
|
||||
if ynh_package_is_installed "jellyfin-ffmpeg5"; then
|
||||
|
@ -111,6 +117,12 @@ ynh_add_nginx_config
|
|||
#=================================================
|
||||
ynh_script_progression --message="Updating a configuration file..." --weight=2
|
||||
|
||||
# Restore the files we just backed up before installing the debs...
|
||||
for name in system.xml network.xml logging.json; do
|
||||
mv -f "$bakdir/$name" "$config_path/$name"
|
||||
done
|
||||
ynh_secure_remove "$bakdir"
|
||||
|
||||
# TODO: investigate if we can avoid overriding system.xml
|
||||
#ynh_add_config --template="system.xml" --destination="$config_path/system.xml"
|
||||
ynh_add_config --template="network.xml" --destination="$config_path/network.xml"
|
||||
|
|
Loading…
Add table
Reference in a new issue