|
@@ -9170,6 +9170,13 @@ function install_search_engine {
|
9170
|
9170
|
|
9171
|
9171
|
# update to a new commit if needed
|
9172
|
9172
|
set_repo_commit $SEARCH_ENGINE_PATH/searx "Search engine commit" "$SEARCH_ENGINE_COMMIT" $SEARCH_ENGINE_REPO
|
|
9173
|
+ if grep "Search engine key" $COMPLETION_FILE; then
|
|
9174
|
+ if [ -f ${SEARCH_ENGINE_PATH}/searx/searx/settings.yml ]; then
|
|
9175
|
+ SEARCH_ENGINE_SECRET_KEY=$(cat $COMPLETION_FILE | grep "Search engine key" | awk -F ':' '{print $2}')
|
|
9176
|
+ sed -i "s|secret_key.*|secret_key : \"${SEARCH_ENGINE_SECRET_KEY}\"|g" ${SEARCH_ENGINE_PATH}/searx/searx/settings.yml
|
|
9177
|
+ sed -i "s|base_url.*|base_url : \"http://${SEARCH_ENGINE_ONION_HOSTNAME}\"|g" ${SEARCH_ENGINE_PATH}/searx/searx/settings.yml
|
|
9178
|
+ fi
|
|
9179
|
+ fi
|
9173
|
9180
|
|
9174
|
9181
|
if grep -Fxq "install_search_engine" $COMPLETION_FILE; then
|
9175
|
9182
|
return
|