forked from zaclys/searxng
		
	[fix] docker generated new settings.yml does not work
In commit5a7b12ewe normalized settings.yml andc6a5cc019andde5a8ee7dwe changed instance name to ``instance_name: "SearXNG"``. This patch adjust the sed expressions to modify: dockerfiles/docker-entrypoint.sh Closes: https://github.com/searxng/searxng/issues/876 Suggested-by: @neiaberau Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
		
							parent
							
								
									10e6881ca8
								
							
						
					
					
						commit
						4fec7a74e5
					
				
					 1 changed files with 9 additions and 8 deletions
				
			
		|  | @ -71,23 +71,24 @@ patch_searxng_settings() { | |||
|     export BASE_URL="${BASE_URL%/}/" | ||||
| 
 | ||||
|     # update settings.yml | ||||
|     sed -i -e "s|base_url : False|base_url : ${BASE_URL}|g" \ | ||||
|        -e "s/instance_name : \"searxng\"/instance_name : \"${INSTANCE_NAME}\"/g" \ | ||||
|        -e "s/autocomplete : \"\"/autocomplete : \"${AUTOCOMPLETE}\"/g" \ | ||||
|     sed -i \ | ||||
|         -e "s|base_url: false|base_url: ${BASE_URL}|g" \ | ||||
|         -e "s/instance_name: \"SearXNG\"/instance_name: \"${INSTANCE_NAME}\"/g" \ | ||||
|         -e "s/autocomplete: \"\"/autocomplete: \"${AUTOCOMPLETE}\"/g" \ | ||||
|         -e "s/ultrasecretkey/$(openssl rand -hex 32)/g" \ | ||||
|         "${CONF}" | ||||
| 
 | ||||
|     # Morty configuration | ||||
| 
 | ||||
|     if [ -n "${MORTY_KEY}" ] && [ -n "${MORTY_URL}" ]; then | ||||
|         sed -i -e "s/image_proxy : False/image_proxy : True/g" \ | ||||
|         sed -i -e "s/image_proxy: false/image_proxy: true/g" \ | ||||
|             "${CONF}" | ||||
|         cat >> "${CONF}" <<-EOF | ||||
| 
 | ||||
| # Morty configuration | ||||
| result_proxy: | ||||
|    url : ${MORTY_URL} | ||||
|    key : !!binary "${MORTY_KEY}" | ||||
|    url: ${MORTY_URL} | ||||
|    key: !!binary "${MORTY_KEY}" | ||||
| EOF | ||||
|     fi | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Markus Heiser
						Markus Heiser