diff --git a/src/freedombone b/src/freedombone index 846d9d81..e4d0a06b 100755 --- a/src/freedombone +++ b/src/freedombone @@ -9198,7 +9198,7 @@ function install_search_engine { sed -i "s|secret_key.*|secret_key : \"${SEARCH_ENGINE_SECRET_KEY}\"|g" ${SEARCH_ENGINE_PATH}/searx/searx/settings.yml if [ -f /var/lib/tor/hidden_service_searx/hostname ]; then SEARCH_ENGINE_ONION_HOSTNAME=$(echo /var/lib/tor/hidden_service_searx/hostname) - sed -i "s|base_url.*|base_url : \"http://${SEARCH_ENGINE_ONION_HOSTNAME}\"|g" ${SEARCH_ENGINE_PATH}/searx/searx/settings.yml + sed -i '0,/RE/s/base_url.*/base_url : \"http://${SEARCH_ENGINE_ONION_HOSTNAME}\/' ${SEARCH_ENGINE_PATH}/searx/searx/settings.yml fi fi fi @@ -9331,8 +9331,8 @@ function install_search_engine { fi sed -i "s|secret_key.*|secret_key : \"${SEARCH_ENGINE_SECRET_KEY}\"|g" ${SEARCH_ENGINE_PATH}/searx/searx/settings.yml sed -i "s|secret_key.*|secret_key : \"${SEARCH_ENGINE_SECRET_KEY}\"|g" ${SEARCH_ENGINE_PATH}/searx/searx/settings_robot.yml - sed -i "s|base_url.*|base_url : \"http://${SEARCH_ENGINE_ONION_HOSTNAME}\"|g" ${SEARCH_ENGINE_PATH}/searx/searx/settings.yml - sed -i "s|base_url.*|base_url : \"http://${SEARCH_ENGINE_ONION_HOSTNAME}\"|g" ${SEARCH_ENGINE_PATH}/searx/searx/settings_robot.yml + sed -i '0,/RE/s/base_url.*/base_url : \"http://${SEARCH_ENGINE_ONION_HOSTNAME}\/' ${SEARCH_ENGINE_PATH}/searx/searx/settings.yml + sed -i '0,/RE/s/base_url.*/base_url : \"http://${SEARCH_ENGINE_ONION_HOSTNAME}\/' ${SEARCH_ENGINE_PATH}/searx/searx/settings_robot.yml # note: this might change to a --tor option in a later version if ! grep 'socks5://127.0.0.1:9050' ${SEARCH_ENGINE_PATH}/searx/searx/settings.yml; then