Set default search if searx is available

This commit is contained in:
Bob Mottram 2017-09-23 12:28:57 +01:00
parent 5293a3cdf2
commit 1f7c90cd49
2 changed files with 4 additions and 1 deletions

View File

@ -1011,7 +1011,6 @@ function install_searx {
systemctl daemon-reload
systemctl start searx.service
DEFAULT_SEARCH="http://$SEARX_ONION_HOSTNAME"
update_default_search_engine
SEARX_PASSWORD="$(create_password ${MINIMUM_PASSWORD_LENGTH})"

View File

@ -535,6 +535,10 @@ function install_dynamicdns {
}
function update_default_search_engine {
if [ -f /var/lib/tor/hidden_service_searx/hostname ]; then
DEFAULT_SEARCH="http://$(cat /var/lib/tor/hidden_service_searx/hostname)"
fi
for d in /home/*/ ; do
USERNAME=$(echo "$d" | awk -F '/' '{print $3}')
if [[ $(is_valid_user "$USERNAME") == "1" ]]; then