| 
				
			 | 
			
			
				@@ -242,11 +242,12 @@ function matrix_configure_homeserver_yaml { 
			 | 
		
	
		
			
			| 
				242
			 | 
			
				242
			 | 
			
			
				     sed -i "s|pid_file:.*|pid_file: \"${MATRIX_DATA_DIR}/homeserver.pid\"|g" "${filepath}" 
			 | 
		
	
		
			
			| 
				243
			 | 
			
				243
			 | 
			
			
				     sed -i "s|log_file:.*|log_file: \"/dev/null\"|g" "${filepath}" 
			 | 
		
	
		
			
			| 
				244
			 | 
			
				244
			 | 
			
			
				     sed -i 's|bind_address:.*|bind_address: 127.0.0.1|g' "${filepath}" 
			 | 
		
	
		
			
			| 
				245
			 | 
			
				
			 | 
			
			
				-    sed -i '0,/x_forwarded:.*/s//x_forwarded: true/' "${filepath}" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				245
			 | 
			
			
				+    sed -i "s|bind_addresses:.*|bind_addresses: ['127.0.0.1']|g" "${filepath}" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				246
			 | 
			
			
				+    sed -i 's|x_forwarded:.*|x_forwarded: false|g' "${filepath}" 
			 | 
		
	
		
			
			| 
				246
			 | 
			
				247
			 | 
			
			
				     sed -i "s|server_name:.*|server_name: \"${MATRIX_DOMAIN_NAME}\"|g" "${filepath}" 
			 | 
		
	
		
			
			| 
				247
			 | 
			
				248
			 | 
			
			
				     sed -i "/trusted_third_party_id_servers:/a     - ${MATRIX_DOMAIN_NAME}" "${filepath}" 
			 | 
		
	
		
			
			| 
				248
			 | 
			
				249
			 | 
			
			
				     sed -i "s|- ${MATRIX_DOMAIN_NAME}|    - ${MATRIX_DOMAIN_NAME}|g" "${filepath}" 
			 | 
		
	
		
			
			| 
				249
			 | 
			
				
			 | 
			
			
				-    sed -i "s|enable_registration:.*|enable_registration: True|g" "${filepath}" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				250
			 | 
			
			
				+    sed -i "s|enable_registration:.*|enable_registration: False|g" "${filepath}" 
			 | 
		
	
		
			
			| 
				250
			 | 
			
				251
			 | 
			
			
				 } 
			 | 
		
	
		
			
			| 
				251
			 | 
			
				252
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				252
			 | 
			
				253
			 | 
			
			
				 function matrix_configure_identityserver { 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -681,9 +682,6 @@ function install_home_server { 
			 | 
		
	
		
			
			| 
				681
			 | 
			
				682
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				682
			 | 
			
				683
			 | 
			
			
				     # Disable the web client 
			 | 
		
	
		
			
			| 
				683
			 | 
			
				684
			 | 
			
			
				     sed -i 's|web_client:.*|web_client: False|g' $MATRIX_DATA_DIR/homeserver.yaml 
			 | 
		
	
		
			
			| 
				684
			 | 
			
				
			 | 
			
			
				-    if ! grep "#- webclient" $MATRIX_DATA_DIR/homeserver.yaml; then 
			 | 
		
	
		
			
			| 
				685
			 | 
			
				
			 | 
			
			
				-        sed -i 's|- webclient.*|#- webclient|g' $MATRIX_DATA_DIR/homeserver.yaml 
			 | 
		
	
		
			
			| 
				686
			 | 
			
				
			 | 
			
			
				-    fi 
			 | 
		
	
		
			
			| 
				687
			 | 
			
				685
			 | 
			
			
				     sed -i 's|, webclient||g' $MATRIX_DATA_DIR/homeserver.yaml 
			 | 
		
	
		
			
			| 
				688
			 | 
			
				686
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				689
			 | 
			
				687
			 | 
			
			
				     chmod -R 700 $MATRIX_DATA_DIR/homeserver.yaml 
			 |