Set default search if searx is available
This commit is contained in:
parent
5293a3cdf2
commit
1f7c90cd49
|
@ -1011,7 +1011,6 @@ function install_searx {
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
systemctl start searx.service
|
systemctl start searx.service
|
||||||
|
|
||||||
DEFAULT_SEARCH="http://$SEARX_ONION_HOSTNAME"
|
|
||||||
update_default_search_engine
|
update_default_search_engine
|
||||||
|
|
||||||
SEARX_PASSWORD="$(create_password ${MINIMUM_PASSWORD_LENGTH})"
|
SEARX_PASSWORD="$(create_password ${MINIMUM_PASSWORD_LENGTH})"
|
||||||
|
|
|
@ -535,6 +535,10 @@ function install_dynamicdns {
|
||||||
}
|
}
|
||||||
|
|
||||||
function update_default_search_engine {
|
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
|
for d in /home/*/ ; do
|
||||||
USERNAME=$(echo "$d" | awk -F '/' '{print $3}')
|
USERNAME=$(echo "$d" | awk -F '/' '{print $3}')
|
||||||
if [[ $(is_valid_user "$USERNAME") == "1" ]]; then
|
if [[ $(is_valid_user "$USERNAME") == "1" ]]; then
|
||||||
|
|
Loading…
Reference in New Issue