Browse Source

Revert "Use newest version of ynh_add_nginx_config from #462" as it's not released (and subject to discussions)!

This reverts commit fac62c49ff1f1199384288cecb6a4fad50adcd1a.
Jimmy Monin 6 years ago
parent
commit
e2911b3db0
3 changed files with 15 additions and 0 deletions
  1. 5 0
      scripts/change_url
  2. 5 0
      scripts/install
  3. 5 0
      scripts/upgrade

+ 5 - 0
scripts/change_url

@@ -66,6 +66,11 @@ then
 	ynh_app_setting_set $app path_url "$path_url"
 	ynh_app_setting_set $app path_url "$path_url"
 	# Create a dedicated nginx config
 	# Create a dedicated nginx config
 	ynh_add_nginx_config
 	ynh_add_nginx_config
+	if [ "$path_url" != "/" ]
+	then
+		ynh_replace_string "^#sub_path_only" "" "$nginx_conf_path"
+	fi
+	ynh_store_file_checksum "$nginx_conf_path"
 fi
 fi
 
 
 # Change the domain for nginx
 # Change the domain for nginx

+ 5 - 0
scripts/install

@@ -105,6 +105,11 @@ ynh_setup_source "$final_path"
 
 
 # Create a dedicated nginx config
 # Create a dedicated nginx config
 ynh_add_nginx_config
 ynh_add_nginx_config
+if [ "$path_url" != "/" ]
+then
+	ynh_replace_string "^#sub_path_only" "" "/etc/nginx/conf.d/$domain.d/$app.conf"
+fi
+ynh_store_file_checksum "/etc/nginx/conf.d/$domain.d/$app.conf"
 
 
 #=================================================
 #=================================================
 # CREATE DEDICATED USER
 # CREATE DEDICATED USER

+ 5 - 0
scripts/upgrade

@@ -83,6 +83,11 @@ ynh_setup_source "$final_path"
 
 
 # Create a dedicated nginx config
 # Create a dedicated nginx config
 ynh_add_nginx_config
 ynh_add_nginx_config
+if [ "$path_url" != "/" ]
+then
+	ynh_replace_string "^#sub_path_only" "" "/etc/nginx/conf.d/$domain.d/$app.conf"
+fi
+ynh_store_file_checksum "/etc/nginx/conf.d/$domain.d/$app.conf"
 
 
 #=================================================
 #=================================================
 # CREATE DEDICATED USER
 # CREATE DEDICATED USER