| 
				
			 | 
			
			
				@@ -36,6 +36,27 @@ SEARCH_ENGINE_ONION_HOSTNAME= 
			 | 
		
	
		
			
			| 
				36
			 | 
			
				36
			 | 
			
			
				 SEARCH_ENGINE_LOGIN_TEXT=$"Search engine login" 
			 | 
		
	
		
			
			| 
				37
			 | 
			
				37
			 | 
			
			
				 SEARCH_ENGINE_PASSWORD= 
			 | 
		
	
		
			
			| 
				38
			 | 
			
				38
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				
			 | 
			
				39
			 | 
			
			
				+function remove_search_engine { 
			 | 
		
	
		
			
			| 
				
			 | 
			
				40
			 | 
			
			
				+	if ! grep -Fxq "install_search_engine" $COMPLETION_FILE; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				41
			 | 
			
			
				+		return 
			 | 
		
	
		
			
			| 
				
			 | 
			
				42
			 | 
			
			
				+	fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				43
			 | 
			
			
				+	systemctl stop searx 
			 | 
		
	
		
			
			| 
				
			 | 
			
				44
			 | 
			
			
				+	systemctl disable searx 
			 | 
		
	
		
			
			| 
				
			 | 
			
				45
			 | 
			
			
				+	rm /etc/systemd/system/searx.service 
			 | 
		
	
		
			
			| 
				
			 | 
			
				46
			 | 
			
			
				+	function_check remove_onion_service 
			 | 
		
	
		
			
			| 
				
			 | 
			
				47
			 | 
			
			
				+	remove_onion_service searx ${SEARCH_ENGINE_ONION_PORT} 
			 | 
		
	
		
			
			| 
				
			 | 
			
				48
			 | 
			
			
				+	userdel -r searx 
			 | 
		
	
		
			
			| 
				
			 | 
			
				49
			 | 
			
			
				+	nginx_dissite searx 
			 | 
		
	
		
			
			| 
				
			 | 
			
				50
			 | 
			
			
				+	if [ -f /etc/nginx/sites-available/searx ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				51
			 | 
			
			
				+		rm /etc/nginx/sites-available/searx 
			 | 
		
	
		
			
			| 
				
			 | 
			
				52
			 | 
			
			
				+	fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				53
			 | 
			
			
				+	if [ -d ${SEARCH_ENGINE_PATH}/searx ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				54
			 | 
			
			
				+		rm -rf ${SEARCH_ENGINE_PATH}/searx 
			 | 
		
	
		
			
			| 
				
			 | 
			
				55
			 | 
			
			
				+	fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				56
			 | 
			
			
				+	sed -i '/install_search_engine/d' $COMPLETION_FILE 
			 | 
		
	
		
			
			| 
				
			 | 
			
				57
			 | 
			
			
				+	sed -i '/Search engine /d' $COMPLETION_FILE 
			 | 
		
	
		
			
			| 
				
			 | 
			
				58
			 | 
			
			
				+} 
			 | 
		
	
		
			
			| 
				
			 | 
			
				59
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				39
			 | 
			
				60
			 | 
			
			
				 function install_search_engine { 
			 | 
		
	
		
			
			| 
				40
			 | 
			
				61
			 | 
			
			
				 	# Note: currently socks5 outgoing proxies to other search engines does not work 
			 | 
		
	
		
			
			| 
				41
			 | 
			
				62
			 | 
			
			
				 	if [[ $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then 
			 |