diff --git a/src/freedombone b/src/freedombone index b9f9723d..502f57a8 100755 --- a/src/freedombone +++ b/src/freedombone @@ -9170,6 +9170,13 @@ function install_search_engine { # update to a new commit if needed set_repo_commit $SEARCH_ENGINE_PATH/searx "Search engine commit" "$SEARCH_ENGINE_COMMIT" $SEARCH_ENGINE_REPO + if grep "Search engine key" $COMPLETION_FILE; then + 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 + fi + fi if grep -Fxq "install_search_engine" $COMPLETION_FILE; then return