Retrieve onion hostname for search engine
This commit is contained in:
parent
cdf3e2d6ce
commit
0e06d3b105
|
@ -9174,9 +9174,12 @@ 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
|
||||
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
|
||||
|
||||
if grep -Fxq "install_search_engine" $COMPLETION_FILE; then
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue