2020-06-19 11:15:15 +02:00
<!DOCTYPE html>
< html >
< head >
< meta charset = "utf-8" / >
2020-09-30 10:35:05 +02:00
< meta name = "viewport" content = "width=device-width, initial-scale=1.0" / >
2020-06-19 11:15:15 +02:00
< meta name = "viewport" content = "width=device-width, initial-scale=1" >
2021-03-27 20:39:04 +01:00
< title > Tooling box utils for administrators — Searx Documentation (Searx-1.0.0.tex)< / title >
2020-06-19 11:15:15 +02:00
< link rel = "stylesheet" href = "../_static/pygments.css" type = "text/css" / >
2021-01-05 16:45:49 +01:00
< link rel = "stylesheet" href = "../_static/searx.css" type = "text/css" / >
2021-02-17 20:54:37 +01:00
< link rel = "stylesheet" type = "text/css" href = "../_static/tabs.css" / >
2020-06-19 11:15:15 +02:00
< script id = "documentation_options" data-url_root = "../" src = "../_static/documentation_options.js" > < / script >
< script src = "../_static/jquery.js" > < / script >
< script src = "../_static/underscore.js" > < / script >
< script src = "../_static/doctools.js" > < / script >
< link rel = "index" title = "Index" href = "../genindex.html" / >
< link rel = "search" title = "Search" href = "../search.html" / >
< link rel = "next" title = "utils/searx.sh" href = "searx.sh.html" / >
2021-03-05 09:46:32 +01:00
< link rel = "prev" title = "searx_extra/standalone_searx.py" href = "../searx_extra/standalone_searx.py.html" / >
2020-06-19 11:15:15 +02:00
< script > DOCUMENTATION _OPTIONS . URL _ROOT = '../' ; < / script >
< / head > < body >
< div class = "related" role = "navigation" aria-label = "related navigation" >
< h3 > Navigation< / h3 >
< ul >
< li class = "right" style = "margin-right: 10px" >
< a href = "../genindex.html" title = "General Index"
accesskey="I">index< / a > < / li >
2020-11-04 14:12:59 +01:00
< li class = "right" >
< a href = "../py-modindex.html" title = "Python Module Index"
>modules< / a > |< / li >
2020-06-19 11:15:15 +02:00
< li class = "right" >
< a href = "searx.sh.html" title = "utils/searx.sh"
accesskey="N">next< / a > |< / li >
< li class = "right" >
2021-03-05 09:46:32 +01:00
< a href = "../searx_extra/standalone_searx.py.html" title = "searx_extra/standalone_searx.py"
2020-06-19 11:15:15 +02:00
accesskey="P">previous< / a > |< / li >
2021-03-27 20:39:04 +01:00
< li class = "nav-item nav-item-0" > < a href = "../index.html" > Searx Documentation (Searx-1.0.0.tex)< / a > » < / li >
2021-03-05 09:46:32 +01:00
< li class = "nav-item nav-item-this" > < a href = "" > Tooling box < code class = "docutils literal notranslate" > < span class = "pre" > utils< / span > < / code > for administrators< / a > < / li >
2020-06-19 11:15:15 +02:00
< / ul >
< / div >
< div class = "document" >
< div class = "documentwrapper" >
< div class = "bodywrapper" >
< div class = "body" role = "main" >
2021-04-08 19:47:22 +02:00
< div class = "section" id = "tooling-box-utils-for-administrators" >
2021-03-05 09:46:32 +01:00
< span id = "toolboxing" > < / span > < span id = "searx-utils" > < / span > < h1 > Tooling box < code class = "docutils literal notranslate" > < span class = "pre" > utils< / span > < / code > for administrators< a class = "headerlink" href = "#tooling-box-utils-for-administrators" title = "Permalink to this headline" > ¶< / a > < / h1 >
< p > In the folder < a class = "reference external" href = "https://github.com/searx/searx/blob/master/utils/" > git://utils/< / a > we maintain some tools useful for administrators.< / p >
2020-06-19 11:15:15 +02:00
< div class = "toctree-wrapper compound" >
2021-04-08 19:47:22 +02:00
< p class = "caption" > < span class = "caption-text" > Contents< / span > < / p >
2020-06-19 11:15:15 +02:00
< ul >
< li class = "toctree-l1" > < a class = "reference internal" href = "searx.sh.html" > < code class = "docutils literal notranslate" > < span class = "pre" > utils/searx.sh< / span > < / code > < / a > < ul >
< li class = "toctree-l2" > < a class = "reference internal" href = "searx.sh.html#install" > Install< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "searx.sh.html#overview" > Overview< / a > < / li >
< / ul >
< / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "filtron.sh.html" > < code class = "docutils literal notranslate" > < span class = "pre" > utils/filtron.sh< / span > < / code > < / a > < ul >
< li class = "toctree-l2" > < a class = "reference internal" href = "filtron.sh.html#create-user" > Create user< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "filtron.sh.html#install-go" > Install go< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "filtron.sh.html#install-filtron" > Install filtron< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "filtron.sh.html#overview" > Overview< / a > < / li >
< / ul >
< / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "morty.sh.html" > < code class = "docutils literal notranslate" > < span class = "pre" > utils/morty.sh< / span > < / code > < / a > < ul >
< li class = "toctree-l2" > < a class = "reference internal" href = "morty.sh.html#create-user" > Create user< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "morty.sh.html#install-go" > Install go< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "morty.sh.html#install-morty" > Install morty< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "morty.sh.html#overview" > Overview< / a > < / li >
< / ul >
< / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "lxc.sh.html" > < code class = "docutils literal notranslate" > < span class = "pre" > utils/lxc.sh< / span > < / code > < / a > < ul >
< li class = "toctree-l2" > < a class = "reference internal" href = "lxc.sh.html#install-suite" > Install suite< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "lxc.sh.html#running-commands" > Running commands< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "lxc.sh.html#setup-searx-buildhost" > Setup searx buildhost< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "lxc.sh.html#overview" > Overview< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "lxc.sh.html#searx-suite" > searx suite< / a > < / li >
< / ul >
< / li >
< / ul >
< / div >
2021-04-08 19:47:22 +02:00
< div class = "section" id = "common-commands-environment" >
2020-06-19 11:15:15 +02:00
< span id = "toolboxing-common" > < / span > < h2 > Common commands & environment< a class = "headerlink" href = "#common-commands-environment" title = "Permalink to this headline" > ¶< / a > < / h2 >
< p > Scripts to maintain services often dispose of common commands and environments.< / p >
< dl >
< dt > < code class = "docutils literal notranslate" > < span class = "pre" > shell< / span > < / code > < span class = "classifier" > command< / span > < / dt > < dd > < p > Opens a shell from the service user < code class = "docutils literal notranslate" > < span class = "pre" > ${SERVICE_USSR}< / span > < / code > , very helpful for
troubleshooting.< / p >
< / dd >
< dt > < code class = "docutils literal notranslate" > < span class = "pre" > inspect< / span > < span class = "pre" > service< / span > < / code > < span class = "classifier" > command< / span > < / dt > < dd > < p > Shows status and log of the service, most often you have a option to enable
more verbose debug logs. Very helpful for debugging, but be careful not to
enable debugging in a production environment!< / p >
< / dd >
< dt > < code class = "docutils literal notranslate" > < span class = "pre" > FORCE_TIMEOUT< / span > < / code > < span class = "classifier" > environment< / span > < / dt > < dd > < p > Sets timeout for interactive prompts. If you want to run a script in batch
job, with defaults choices, set < code class = "docutils literal notranslate" > < span class = "pre" > FORCE_TIMEOUT=0< / span > < / code > . By example; to install a
reverse proxy for filtron on all containers of the < a class = "reference internal" href = "lxc.sh.html#lxc-searx-env" > < span class = "std std-ref" > searx suite< / span > < / a > use< / p >
< div class = "highlight-none notranslate" > < div class = "highlight" > < pre > < span > < / span > sudo -H ./utils/lxc.sh cmd -- FORCE_TIMEOUT=0 ./utils/filtron.sh apache install
< / pre > < / div >
< / div >
< / dd >
< / dl >
2021-04-08 19:47:22 +02:00
< / div >
< div class = "section" id = "tooling-box-setup" >
2020-06-19 11:15:15 +02:00
< span id = "toolboxing-setup" > < / span > < h2 > Tooling box setup< a class = "headerlink" href = "#tooling-box-setup" title = "Permalink to this headline" > ¶< / a > < / h2 >
2021-01-12 10:55:12 +01:00
< p > The main setup is done in the < a class = "reference external" href = "https://github.com/searx/searx/blob/master/.config.sh" > git://.config.sh< / a > (read also < a class = "reference internal" href = "../admin/settings.html#settings-global" > < span class = "std std-ref" > Global Settings< / span > < / a > ).< / p >
2020-06-19 11:15:15 +02:00
< div class = "highlight-bash notranslate" > < div class = "highlight" > < pre > < span > < / span > < span class = "c1" > # -*- coding: utf-8; mode: sh -*-< / span >
< span class = "c1" > # SPDX-License-Identifier: AGPL-3.0-or-later< / span >
< span class = "c1" > # shellcheck shell=bash disable=SC2034< / span >
< span class = "c1" > #< / span >
< span class = "c1" > # This environment is used by ./utils scripts like filtron.sh or searx.sh. The< / span >
< span class = "c1" > # default values are *most flexible* and *best maintained*, you normally not< / span >
< span class = "c1" > # need to change the defaults (except PUBLIC_URL).< / span >
< span class = "c1" > #< / span >
< span class = "c1" > # Before you change any value here you have to uninstall any previous< / span >
< span class = "c1" > # installation. Further is it recommended to backup your changes simply by< / span >
< span class = "c1" > # adding them to you local brand (git branch)::< / span >
< span class = "c1" > #< / span >
< span class = "c1" > # git add .config< / span >
< span class = "c1" > # The public URL of the searx instance: PUBLIC_URL=" https://mydomain.xy/searx" < / span >
< span class = "c1" > # The default is taken from ./utils/brand.env.< / span >
< span class = "nv" > PUBLIC_URL< / span > < span class = "o" > =< / span > < span class = "s2" > " < / span > < span class = "si" > ${< / span > < span class = "nv" > SEARX_URL< / span > < span class = "si" > }< / span > < span class = "s2" > " < / span >
< span class = "k" > if< / span > < span class = "o" > [[< / span > < span class = "si" > ${< / span > < span class = "nv" > PUBLIC_URL< / span > < span class = "si" > }< / span > < span class = "o" > ==< / span > < span class = "s2" > " https://searx.me" < / span > < span class = "o" > ]]< / span > < span class = "p" > ;< / span > < span class = "k" > then< / span >
< span class = "c1" > # hint: Linux containers do not have DNS entries, lets use IPs< / span >
< span class = "nv" > PUBLIC_URL< / span > < span class = "o" > =< / span > < span class = "s2" > " http://< / span > < span class = "k" > $(< / span > primary_ip< span class = "k" > )< / span > < span class = "s2" > /searx" < / span >
< span class = "k" > fi< / span >
< span class = "c1" > # searx.sh< / span >
< span class = "c1" > # ---------< / span >
< span class = "c1" > # SEARX_INTERNAL_URL=" 127.0.0.1:8888" < / span >
2020-12-08 20:36:18 +01:00
< span class = "c1" > # SEARX_SETTINGS_TEMPLATE=" ${REPO_ROOT}/utils/templates/etc/searx/use_default_settings.yml" < / span >
2020-06-19 11:15:15 +02:00
2020-12-24 10:03:21 +01:00
< span class = "c1" > # Only change, if you maintain a searx brand in your searx fork (GIT_URL) which< / span >
< span class = "c1" > # is not hold by branch ' master' . The branch has to be a local branch, in the< / span >
< span class = "c1" > # repository from which you install (which is most often the case). If you want< / span >
< span class = "c1" > # to install branch ' foo' , don' t forget to run ' git branch foo origin/foo' once.< / span >
2020-06-19 11:15:15 +02:00
< span class = "c1" > # GIT_BRANCH=" ${GIT_BRANCH:-master}" < / span >
< span class = "c1" > # filtron.sh< / span >
< span class = "c1" > # ----------< / span >
< span class = "c1" > # FILTRON_API=" 127.0.0.1:4005" < / span >
< span class = "c1" > # FILTRON_LISTEN=" 127.0.0.1:4004" < / span >
< span class = "c1" > # FILTRON_TARGET=" 127.0.0.1:8888" < / span >
< span class = "c1" > # morty.sh< / span >
< span class = "c1" > # --------< / span >
< span class = "c1" > # morty listen address< / span >
< span class = "c1" > # MORTY_LISTEN=" 127.0.0.1:3000" < / span >
< span class = "c1" > # PUBLIC_URL_PATH_MORTY=" /morty/" < / span >
< span class = "c1" > # system services< / span >
< span class = "c1" > # ---------------< / span >
< span class = "c1" > # Common $HOME folder of the service accounts< / span >
< span class = "c1" > # SERVICE_HOME_BASE=" /usr/local" < / span >
< span class = "c1" > # **experimental**: Set SERVICE_USER to run all services by one account, but be< / span >
< span class = "c1" > # aware that removing discrete components might conflict!< / span >
< span class = "c1" > # SERVICE_USER=searx< / span >
< / pre > < / div >
< / div >
2021-04-08 19:47:22 +02:00
< / div >
< / div >
2020-06-19 11:15:15 +02:00
2020-09-30 10:35:05 +02:00
< div class = "clearer" > < / div >
2020-06-19 11:15:15 +02:00
< / div >
< / div >
< / div >
< span id = "sidebar-top" > < / span >
< div class = "sphinxsidebar" role = "navigation" aria-label = "main navigation" >
< div class = "sphinxsidebarwrapper" >
< p class = "logo" > < a href = "../index.html" >
< img class = "logo" src = "../_static/searx_logo_small.png" alt = "Logo" / >
< / a > < / p >
< h3 > Project Links< / h3 >
< ul >
2020-09-30 10:35:05 +02:00
< li > < a href = "https://github.com/searx/searx" > Source< / a >
2020-06-19 11:15:15 +02:00
2020-09-30 10:35:05 +02:00
< li > < a href = "https://github.com/searx/searx/wiki" > Wiki< / a >
2020-06-19 11:15:15 +02:00
2021-01-12 10:55:12 +01:00
< li > < a href = "https://searx.space" > Public instances< / a >
2020-06-19 11:15:15 +02:00
< li > < a href = "https://twitter.com/Searx_engine" > Twitter< / a >
2021-01-12 10:55:12 +01:00
< li > < a href = "https://github.com/searx/searx/issues" > Issue Tracker< / a >
2020-06-19 11:15:15 +02:00
< / ul > < h3 > Navigation< / h3 >
< ul >
< li > < a href = "../index.html" > Overview< / a >
< ul >
2021-03-05 09:46:32 +01:00
< li > Previous: < a href = "../searx_extra/standalone_searx.py.html" title = "previous chapter" > < code class = "docutils literal notranslate" > < span class = "pre" > searx_extra/standalone_searx.py< / span > < / code > < / a >
2020-06-19 11:15:15 +02:00
< li > Next: < a href = "searx.sh.html" title = "next chapter" > < code class = "docutils literal notranslate" > < span class = "pre" > utils/searx.sh< / span > < / code > < / a >
< / ul >
< / li >
< / ul >
< div id = "searchbox" style = "display: none" role = "search" >
< h3 id = "searchlabel" > Quick search< / h3 >
< div class = "searchformwrapper" >
< form class = "search" action = "../search.html" method = "get" >
< input type = "text" name = "q" aria-labelledby = "searchlabel" / >
< input type = "submit" value = "Go" / >
< / form >
< / div >
< / div >
< script > $ ( '#searchbox' ) . show ( 0 ) ; < / script >
< / div >
< / div >
< div class = "clearer" > < / div >
< / div >
< div class = "footer" role = "contentinfo" >
© Copyright 2015-2020, Adam Tauber, Noémi Ványi.
2021-04-21 18:14:58 +02:00
Created using < a href = "https://www.sphinx-doc.org/" > Sphinx< / a > 3.5.3.
2020-06-19 11:15:15 +02:00
< / div >
< script src = "../_static/version_warning_offset.js" > < / script >
< / body >
< / html >