From 7f58a94f8f2f893dec5fe67524a05317d424409d Mon Sep 17 00:00:00 2001 From: frju365 Date: Mon, 16 Apr 2018 20:53:22 +0200 Subject: [PATCH] Update install --- scripts/install | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 5bd15e8..5e26ab0 100644 --- a/scripts/install +++ b/scripts/install @@ -96,10 +96,15 @@ chown $app: $final_path -R chmod 755 $final_path -R #================================================= -# Modify Nginx configuration file and copy it to Nginx conf directory +# NGINX CONFIGURATION #================================================= -ynh_nginx_config +if [ "$path_url" != "/" ] +then + ynh_replace_string "^#sub_path_only" "" "../conf/nginx.conf" +fi +ynh_replace_string "__PATH__/" "${path_url%/}/" "../conf/nginx.conf" +ynh_add_nginx_config #================================================= # ADD SYSTEMD SERVICE @@ -108,7 +113,7 @@ ynh_nginx_config ynh_replace_string "__NODE__" "$nodejs_path" "../conf/systemd.service" ynh_replace_string "__NODEJS__" "$nodejs_use_version" "../conf/systemd.service" ynh_replace_string "__ENV_PATH__" "$PATH" "../conf/systemd.service" -ynh_systemd_config +ynh_add_systemd_config #=================================================