From 8be2013da5981dac5088282e01fb5d117ebde858 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Holcroft Date: Mon, 23 Oct 2017 16:34:18 +0200 Subject: [PATCH] Add is_public replacement and final_path addition --- scripts/upgrade | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index fdbb2ad..b40fd12 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -40,6 +40,22 @@ then # Old version doesnt have is_public settings ynh_app_setting_set "$app" is_public "$is_public" fi +# Fix is_public as a boolean value +if [ "$is_public" = "Yes" ]; then + ynh_app_setting_set "$app" is_public 1 + is_public=1 +elif [ "$is_public" = "No" ]; then + ynh_app_setting_set "$app" is_public 0 + is_public=0 +fi + +# If final_path doesn't exist, create it +if [[ -z "$final_path" ]] +then + final_path="/var/www/$app" + ynh_app_setting_set "$app" final_path "$final_path" +fi + #================================================= # CHECK THE PATH #=================================================