1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/redirect_ynh.git synced 2024-09-03 20:16:10 +02:00

upgrade.sh: delete redirect_path legacy setting

This commit is contained in:
Félix Piédallu 2023-12-12 17:07:28 +01:00 committed by Alexandre Aubin
parent 2a7d414d11
commit 61d756ad99

View file

@ -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
#=================================================