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 2021-06-26 18:53:34 +02:00
parent 8ee1e53a9d
commit 5ac33e41f9

View file

@ -83,8 +83,21 @@ 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"
fi
#=================================================
@ -122,11 +135,11 @@ pip3 install --requirement $final_path/requirements-ynh.txt --upgrade
#=================================================
# CONFIGURE SEARX
#=================================================
ynh_script_progression --message="Configuring Searx..." --weight=2
# ynh_script_progression --message="Configuring Searx..." --weight=2
secret_key=$(ynh_string_random)
# secret_key=$(ynh_string_random)
ynh_add_config --template="../conf/settings.yml" --destination="$final_path/searx/settings.yml"
# ynh_add_config --template="../conf/settings.yml" --destination="$final_path/searx/settings.yml"
#=================================================
# GENERIC FINALISATION