From 64b682cd8e047a71d5076c8c0fdcdc9c70329df9 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Wed, 22 Nov 2017 18:41:42 +0100 Subject: [PATCH] Fix empty is_public --- scripts/upgrade | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 1339e41..09ddaf4 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -30,6 +30,15 @@ if [ "$is_public" = "Yes" ]; then elif [ "$is_public" = "No" ]; then ynh_app_setting_set $app is_public 0 is_public=0 +elif [ -z "$is_public" ]; then + if grep --quiet "unprotected_uris" "/etc/yunohost/apps/$app/settings.yml" + then + ynh_app_setting_set $app is_public 1 + is_public=1 + else + ynh_app_setting_set $app is_public 0 + is_public=0 + fi fi # If final_path doesn't exist, create it