From b1962b33f703692899146be7e2b0f3642dea8fcd Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Wed, 3 Jun 2020 23:57:07 +0200 Subject: [PATCH] syntax error --- scripts/install | 7 ++++--- scripts/upgrade | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index fac5139..f0b6fd0 100755 --- a/scripts/install +++ b/scripts/install @@ -78,13 +78,14 @@ ynh_app_setting_delete --app=$app --key=skipped_uris #================================================= ynh_script_progression --message="Configuring nginx web server..." --time --weight=1 -# Modify Nginx configuration file and copy it to Nginx conf directory -ynh_replace_string --match_string="YNH_WWW_PATH" --replace_string="$path_url" --target_file="$final_path/nginx.conf" -ynh_replace_string --match_string='YNH_WWW_ALIAS' --replace_string='$final_path' --target_file="$final_path/nginx.conf" ### `ynh_add_nginx_config` will use the file conf/nginx.conf # Create a dedicated nginx config ynh_add_nginx_config +# Modify Nginx configuration file and copy it to Nginx conf directory +ynh_replace_string --match_string="YNH_WWW_PATH" --replace_string="$path_url" --target_file="$final_path/nginx.conf" +ynh_replace_string --match_string='YNH_WWW_ALIAS' --replace_string='$final_path' --target_file="$final_path/nginx.conf" + if [ "$path_url" != "/" ] then ynh_replace_string "^#sub_path_only" "" "/etc/nginx/conf.d/$domain.d/$app.conf" diff --git a/scripts/upgrade b/scripts/upgrade index 506060b..016b4c2 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -118,12 +118,13 @@ fi #================================================= ynh_script_progression --message="Upgrading nginx web server configuration..." --time --weight=1 +ynh_add_nginx_config + # Modify Nginx configuration file and copy it to Nginx conf directory ynh_replace_string --match_string="YNH_WWW_PATH" --replace_string="$path_url/" --target_file="$final_path/nginx_conf" ynh_replace_string --match_string='YNH_WWW_ALIAS' --replace_string='$final_path/' --target_file="$final_path/nginx_conf" ### `ynh_add_nginx_config` will use the file conf/nginx.conf # Create a dedicated nginx config -ynh_add_nginx_config if [ "$path_url" != "/" ] then