diff --git a/scripts/upgrade b/scripts/upgrade index 639b139..f317e68 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -7,18 +7,17 @@ source /usr/share/yunohost/helpers # ENSURE DOWNWARD COMPATIBILITY #================================================= -if [[ "${redirect_type:-}" == *"proxy"* ]] -then +if [[ "${redirect_type:-}" == *"proxy"* ]]; then redirect_type="reverseproxy" else redirect_type="redirect" fi ynh_app_setting_set $app 'redirect_type' $redirect_type -if [[ -z "${target:-}" ]] && [[ -n "${redirect_path:-}" ]] -then +if [[ -z "${target:-}" ]] && [[ -n "${redirect_path:-}" ]]; then target="$redirect_path" - ynh_app_setting_set $app target "$redirect_path" + ynh_app_setting_delete --app=$app --key=redirect_path + ynh_app_setting_set --app=$app --key=target --value="$redirect_path" fi #=================================================