From b19ae35fc27de201b71ef166245406bc83314962 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 27 Feb 2019 03:37:41 +0100 Subject: [PATCH] Fix path_url --- scripts/install | 2 +- scripts/upgrade | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 2c0a215..006fd75 100644 --- a/scripts/install +++ b/scripts/install @@ -163,7 +163,7 @@ ynh_app_setting_set $app final_path $final_path ynh_print_info "Configuring nginx web server..." ### `ynh_add_nginx_config` will use the file conf/nginx.conf -if [ $path = "/" ]; then +if [ $path_url = "/" ]; then ynh_replace_string "__SUB_PATH__" "" "..conf/nginx.conf" else ynh_replace_string "__SUB_PATH__" "$path" "..conf/nginx.conf" diff --git a/scripts/upgrade b/scripts/upgrade index c79b405..2882934 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -77,7 +77,8 @@ path_url=$(ynh_normalize_url_path $path_url) ynh_print_info "Upgrading nginx web server configuration..." # Create a dedicated nginx config -if [ $path = "/" ]; then +if [ $path_url = "/" ] +then ynh_replace_string "__SUB_PATH__" "" "..conf/nginx.conf" else ynh_replace_string "__SUB_PATH__" "$path" "..conf/nginx.conf"