1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/searx_ynh.git synced 2024-09-03 20:16:30 +02:00

Update upgrade

This commit is contained in:
ericgaspar 2022-08-15 17:55:40 +02:00
parent d96e13b636
commit fc39fd74c6

View file

@ -82,20 +82,8 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Upgrading source files..." --weight=3
# Create a temporary directory
tmpdir="$(mktemp -d)"
# Backup the config file in the temp dir
cp -a "$final_path/searx/settings.yml" "$tmpdir/settings.yml"
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$final_path"
# Copy the admin saved settings from tmp directory to final path
cp -a "$tmpdir/settings.yml" "$final_path/searx/settings.yml"
# Remove the tmp directory securely
ynh_secure_remove --file="$tmpdir"
ynh_setup_source --dest_dir="$final_path" --keep="searx/settings.yml"
fi
#=================================================