From 5ec3836cf303a240e9a02a57e3026687cc9bc5dd Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 21 Nov 2021 17:07:15 +0100 Subject: [PATCH] keep --- scripts/install | 1 - scripts/upgrade | 16 +--------------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/scripts/install b/scripts/install index 2c6f59c..0da2b87 100644 --- a/scripts/install +++ b/scripts/install @@ -101,7 +101,6 @@ pip3 install --requirement $final_path/requirements-ynh.txt --no-cache-dir ynh_script_progression --message="Configuring Searx..." --weight=2 secret_key=$(ynh_string_random) - ynh_add_config --template="../conf/settings.yml" --destination="$final_path/searx/settings.yml" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 740e104..0ffffa9 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -83,21 +83,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="$final_path/searx/settings.yml" fi #================================================= @@ -138,7 +125,6 @@ pip3 install --requirement $final_path/requirements-ynh.txt --upgrade # ynh_script_progression --message="Configuring Searx..." --weight=2 # secret_key=$(ynh_string_random) - # ynh_add_config --template="../conf/settings.yml" --destination="$final_path/searx/settings.yml" #=================================================