#!/bin/bash source /usr/share/yunohost/helpers #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= 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 target="$redirect_path" ynh_app_setting_set $app target "$redirect_path" fi #================================================= # CONFIGURE NGINX #================================================= ynh_script_progression --message="Configuring NGINX web server..." --weight=1 mv ../conf/{nginx-$redirect_type.conf,nginx.conf} ynh_add_nginx_config ynh_script_progression --message="Upgrade of $app completed" --last