diff --git a/src/freedombone b/src/freedombone index 502f57a8..dbc814fe 100755 --- a/src/freedombone +++ b/src/freedombone @@ -9174,7 +9174,10 @@ function install_search_engine { if [ -f ${SEARCH_ENGINE_PATH}/searx/searx/settings.yml ]; then SEARCH_ENGINE_SECRET_KEY=$(cat $COMPLETION_FILE | grep "Search engine key" | awk -F ':' '{print $2}') sed -i "s|secret_key.*|secret_key : \"${SEARCH_ENGINE_SECRET_KEY}\"|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.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 + fi fi fi