From 2644509b969d8a842d8458b39b8af6280812d1c0 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 16 Feb 2021 23:38:26 +0100 Subject: [PATCH] Small fixes --- manifest.json | 2 +- scripts/install | 8 ++++---- scripts/upgrade | 7 +++++++ 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/manifest.json b/manifest.json index 23d1d2d..2c4c9cd 100644 --- a/manifest.json +++ b/manifest.json @@ -7,7 +7,7 @@ "fr": "Méta-moteur de recherche respectueux de la vie privée et bidouillable", "de": "Meta-Suchmaschine, die den Privatsphäre wahrt und 'hackable' ist." }, - "version": "0.18.0~ynh2", + "version": "0.18.0~ynh3", "url": "https://searx.github.io/searx/", "license": "AGPL-3.0-or-later", "maintainer": { diff --git a/scripts/install b/scripts/install index 323576c..35afa76 100644 --- a/scripts/install +++ b/scripts/install @@ -54,7 +54,7 @@ ynh_app_setting_set --app=$app --key=is_public --value=$is_public #================================================= # INSTALL DEPENDENCIES #================================================= -ynh_script_progression --message="Installing dependencies..." --weight=35 +ynh_script_progression --message="Installing dependencies..." --weight=2 ynh_install_app_dependencies $pkg_dependencies @@ -117,7 +117,7 @@ ynh_store_file_checksum --file="$final_path/searx/settings.yml" # SET PERMISSIONS ON SEARX DIRECTORY #================================================= -chown -R $app: "$final_path" +chown -R $app: $final_path #================================================= # CONFIGURE UWSGI FOR SEARX @@ -139,12 +139,12 @@ ynh_systemd_action --service_name=uwsgi-app@$app.service --action=start --line_m #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring SSOwat..." --weight=2 +ynh_script_progression --message="Configuring permissions..." --weight=2 # Make app public if necessary or protect it if [ $is_public -eq 1 ] then - ynh_permission_update --permission "main" --add "visitors" + ynh_permission_update --permission="main" --add="visitors" fi #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 0caaa3c..c35e989 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -47,6 +47,13 @@ if [ -z "$final_path" ]; then ynh_app_setting_set --app=$app --key=final_path --value=$final_path fi +# Cleaning legacy permissions +if ynh_legacy_permissions_exists; then + ynh_legacy_permissions_delete_all + + ynh_app_setting_delete --app=$app --key=is_public +fi + #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #=================================================