| 
					
				 | 
			
			
				@@ -43,6 +43,7 @@ sudo cp -a ../sources/. $src_path 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 # you may need to make some file and/or directory writeable by www-data (nginx user) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 sudo chown -R root: $src_path 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+### MySQL (can be removed if not used) ### 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 # If your app use a MySQL database you can use these lines to bootstrap 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 # a database, an associated user and save the password in app settings. 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 # 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -56,6 +57,7 @@ sudo chown -R root: $src_path 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 # # Load initial SQL into the new database 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 # ynh_mysql_connect_as "$dbuser" "$dbpass" "$dbname" \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 #     < "../sources/sql/mysql.init.sql" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+### MySQL end ### 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 # Modify Nginx configuration file and copy it to Nginx conf directory 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 nginx_conf=../conf/nginx.conf 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -63,10 +65,10 @@ sed -i "s@YNH_WWW_PATH@$path@g" $nginx_conf 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 sed -i "s@YNH_WWW_ALIAS@$src_path/@g" $nginx_conf 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 # If a dedicated php-fpm process is used: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 # Don't forget to modify ../conf/nginx.conf accordingly or your app will not work! 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-# 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 # sed -i "s@YNH_WWW_APP@$app@g" $nginx_conf 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 sudo cp $nginx_conf /etc/nginx/conf.d/$domain.d/$app.conf 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+### PHP (can be removed if not used) ### 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 # If a dedicated php-fpm process is used: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 # Don't forget to modify ../conf/php-fpm.conf accordingly or your app will not work! 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 # 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -77,6 +79,8 @@ sudo cp $nginx_conf /etc/nginx/conf.d/$domain.d/$app.conf 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 # sudo cp ../conf/php-fpm.conf $finalphpconf 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 # sudo chown root: $finalphpconf 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 # sudo chmod 644 $finalphpconf 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+# sudo service php5-fpm reload 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+### PHP end ### 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 # If app is public, add url to SSOWat conf as skipped_uris 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 if [[ $is_public -eq 1 ]]; then 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -86,6 +90,3 @@ fi 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 # Reload services 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 sudo service nginx reload 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-# If a dedicated php-fpm process is used: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-# sudo service php5-fpm reload 
			 |