This commit is contained in:
Bob Mottram 2017-09-23 12:32:48 +01:00
commit fc62fe6bfd
4 changed files with 46 additions and 24 deletions

View File

@ -39,7 +39,7 @@ Once it has installed go to *About* on the *Administrator control panel* and loo
* Make it your default search * Make it your default search
If you are using a Tor browser or Firefox then click on the magnifying glass icon next to the search box and you can then add your metasearch site. A small icon will appear called "/Freedombone Metasearch/" and you can then right click on it and make it the default search. In a Tor browser click on the magnifying glass icon next to the search box and you can then add your metasearch site. A small icon will appear called "/Freedombone Metasearch/" and you can then right click on it and make it the default search.
* Enabling password login * Enabling password login

View File

@ -846,6 +846,7 @@ function remove_searx {
remove_completion_param install_searx remove_completion_param install_searx
sed -i '/Search engine /d' $COMPLETION_FILE sed -i '/Search engine /d' $COMPLETION_FILE
sed -i '/searx /d' $COMPLETION_FILE sed -i '/searx /d' $COMPLETION_FILE
update_default_search_engine
} }
function install_searx { function install_searx {
@ -1011,6 +1012,8 @@ function install_searx {
systemctl daemon-reload systemctl daemon-reload
systemctl start searx.service systemctl start searx.service
update_default_search_engine
SEARX_PASSWORD="$(create_password ${MINIMUM_PASSWORD_LENGTH})" SEARX_PASSWORD="$(create_password ${MINIMUM_PASSWORD_LENGTH})"
${PROJECT_NAME}-pass -u $MY_USERNAME -a searx -p "$SEARX_PASSWORD" ${PROJECT_NAME}-pass -u $MY_USERNAME -a searx -p "$SEARX_PASSWORD"
if grep -q "$MY_USERNAME:" /etc/nginx/.htpasswd; then if grep -q "$MY_USERNAME:" /etc/nginx/.htpasswd; then

View File

@ -534,20 +534,39 @@ function install_dynamicdns {
mark_completed $FUNCNAME mark_completed $FUNCNAME
} }
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
if ! grep -q "WWW_HOME" /home/$USERNAME/.bashrc; then
if ! grep -q 'controluser' /home/$USERNAME/.bashrc; then
if ! grep -q 'export WWW_HOME=' /home/$USERNAME/.bashrc; then
echo "export WWW_HOME=$DEFAULT_SEARCH" >> /home/$USERNAME/.bashrc
else
sed -i "s|export WWW_HOME=.*|export WWW_HOME=$DEFAULT_SEARCH|g" /home/$USERNAME/.bashrc
fi
else
if ! grep -q 'export WWW_HOME=' /home/$USERNAME/.bashrc; then
sed -i "/controluser/i export WWW_HOME=$DEFAULT_SEARCH" /home/$USERNAME/.bashrc
else
sed -i "s|export WWW_HOME=.*|export WWW_HOME=$DEFAULT_SEARCH|g" /home/$USERNAME/.bashrc
fi
fi
fi
fi
done
}
function install_command_line_browser { function install_command_line_browser {
if [[ $(is_completed $FUNCNAME) == "1" ]]; then if [[ $(is_completed $FUNCNAME) == "1" ]]; then
return return
fi fi
apt-get -yq install elinks apt-get -yq install elinks
update_default_search_engine
# set the home page
if ! grep -q "WWW_HOME" /home/$MY_USERNAME/.bashrc; then
if ! grep -q 'controluser' /home/$MY_USERNAME/.bashrc; then
echo "export WWW_HOME=$DEFAULT_SEARCH" >> /home/$MY_USERNAME/.bashrc
else
sed -i "/controluser/i export WWW_HOME=$DEFAULT_SEARCH" /home/$MY_USERNAME/.bashrc
fi
fi
mark_completed $FUNCNAME mark_completed $FUNCNAME
} }

View File

@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head> <head>
<!-- 2017-09-23 Sat 11:02 --> <!-- 2017-09-23 Sat 11:08 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<title>&lrm;</title> <title>&lrm;</title>
@ -265,9 +265,9 @@ In terms of security both the connection between you and the server, and the out
</div> </div>
</div> </div>
<div id="outline-container-org404708e" class="outline-2"> <div id="outline-container-org82f976b" class="outline-2">
<h2 id="org404708e">Installation</h2> <h2 id="org82f976b">Installation</h2>
<div class="outline-text-2" id="text-org404708e"> <div class="outline-text-2" id="text-org82f976b">
<p> <p>
ssh into the system with: ssh into the system with:
</p> </p>
@ -287,18 +287,18 @@ Once it has installed go to <b>About</b> on the <b>Administrator control panel</
</div> </div>
</div> </div>
<div id="outline-container-org312dbda" class="outline-2"> <div id="outline-container-orgb6a91b8" class="outline-2">
<h2 id="org312dbda">Make it your default search</h2> <h2 id="orgb6a91b8">Make it your default search</h2>
<div class="outline-text-2" id="text-org312dbda"> <div class="outline-text-2" id="text-orgb6a91b8">
<p> <p>
If you are using a Tor browser or Firefox then click on the magnifying glass icon next to the search box and you can then add your metasearch site. A small icon will appear called "<i>Freedombone Metasearch</i>" and you can then right click on it and make it the default search. In a Tor browser click on the magnifying glass icon next to the search box and you can then add your metasearch site. A small icon will appear called "<i>Freedombone Metasearch</i>" and you can then right click on it and make it the default search.
</p> </p>
</div> </div>
</div> </div>
<div id="outline-container-org6b74e84" class="outline-2"> <div id="outline-container-org5b87faf" class="outline-2">
<h2 id="org6b74e84">Enabling password login</h2> <h2 id="org5b87faf">Enabling password login</h2>
<div class="outline-text-2" id="text-org6b74e84"> <div class="outline-text-2" id="text-org5b87faf">
<p> <p>
It's possible that you might not want just anyone on the interwebs to be able to use your metasearch engine. Even with the onion routing this might carry some legal risk or make you a target for denial-of-service attempts (although Tor's rate limits and the firewall will give you some defense against that). It's possible that you might not want just anyone on the interwebs to be able to use your metasearch engine. Even with the onion routing this might carry some legal risk or make you a target for denial-of-service attempts (although Tor's rate limits and the firewall will give you some defense against that).
</p> </p>
@ -309,9 +309,9 @@ To enable password login go to the <b>Administrator control panel</b> then <b>Ap
</div> </div>
</div> </div>
<div id="outline-container-orgae556b2" class="outline-2"> <div id="outline-container-org6692381" class="outline-2">
<h2 id="orgae556b2">Customization</h2> <h2 id="org6692381">Customization</h2>
<div class="outline-text-2" id="text-orgae556b2"> <div class="outline-text-2" id="text-org6692381">
<p> <p>
It's also possible to customise the background image if you go to <b>App settings</b> then select <b>searx</b>. It's also possible to customise the background image if you go to <b>App settings</b> then select <b>searx</b>.
</p> </p>