diff options
author | Markus Heiser <markus.heiser@darmarit.de> | 2021-06-29 20:08:10 +0200 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarit.de> | 2021-07-21 14:38:57 +0200 |
commit | f61c918dd4ea211f32874f1072ecfca0f39fcca4 (patch) | |
tree | 3acb0261274799b77a35ed9276d0a8f0cfcb90f3 /.config.sh | |
parent | 2964a24b3d82651cfd9e30f2ba659bf0f5b2579a (diff) | |
download | searxng-f61c918dd4ea211f32874f1072ecfca0f39fcca4.tar.gz searxng-f61c918dd4ea211f32874f1072ecfca0f39fcca4.zip |
[mod] normalize .config.sh with settings.yml
In commit 94851790 we have centralized all SearXNG setups in the settings.yml
file:
94851790 [mod] move brand options from Makefile to settings.yml
This step has not yet been completed for the installation procedures! Since all
SearXNG setups are done in the settings.yml these environment variables needs to
be removed from the ./conf.sh file. Scripts and other tasks running outside of
an instance got the needed values from the ./utils/brand.env file.
By example: ATM the environment variables of the ./config.sh file are in
conflict with them from settings.yml:
- PUBLIC_URL --> {server:base_url}
- SEARX_INTERNAL_HTTP --> {server:bind_address}.{server:port}
- GIT_BRANCH --> {brand:GIT_URL}
These environment variable of a SearXNG instance and additional
- SEARX_SETTINGS_TEMPLATE
has been remove from the '.config.sh' file. With this patch, the main focus of
./conf.sh resists on environment variables needed for the installation of morty,
filtron software.
modified .config.sh:
- removed no longer supported variables (see above)
- add comment about: SearXNG setup in settings.yml
modified utils/searx.sh:
- SEARX_INTERNAL_HTTP no longer take from .config.sh
- SEARX_SETTINGS_PATH /etc/searx/settings.yml
- SEARX_SETTINGS_TEMPLATE obsolete
modified utils/lib_install.sh:
Initialize environment variables SEARX_PYENV, SEARX_SETTINGS_PATH and
PUBLIC_URL.
modified: utils/morty.sh
Add missing hint about SEARX_SETTINGS_PATH and move PUBLIC_URL to
utils/lib_install.sh
modified: utils/morty.sh
Move PUBLIC_URL to utils/lib_install.sh
Renamed utils/templates/etc/searx/use_default_settings.yml -> settings.yml
- removed option which can't be modified after installation
- add some comments with examples
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to '.config.sh')
-rw-r--r-- | .config.sh | 57 |
1 files changed, 25 insertions, 32 deletions
diff --git a/.config.sh b/.config.sh index 3a17b8b29..4d86aca42 100644 --- a/.config.sh +++ b/.config.sh @@ -2,48 +2,41 @@ # SPDX-License-Identifier: AGPL-3.0-or-later # shellcheck shell=bash disable=SC2034 # -# This environment is used by ./utils scripts like filtron.sh or searx.sh. The -# default values are *most flexible* and *best maintained*, you normally not -# need to change the defaults (except PUBLIC_URL). +# This file should be edited only ones just before the installation of any +# service is done. After the installation of the searx service a copy of this +# file is placed into the $SEARX_SRC of the instance, e.g.:: # -# Before you change any value here you have to uninstall any previous -# installation. Further is it recommended to backup your changes simply by -# adding them to you local brand (git branch):: +# /usr/local/searx/searx-src/.config.sh # -# git add .config - -# The public URL of the searx instance: PUBLIC_URL="https://mydomain.xy/searx" -# The default is taken from ./utils/brand.env. - -PUBLIC_URL="${SEARX_URL}" - -if [[ ${PUBLIC_URL} == "https://searx.me" ]]; then - # hint: Linux containers do not have DNS entries, lets use IPs - PUBLIC_URL="http://$(primary_ip)/searx" -fi - -# searx.sh -# --------- +# .. hint:: +# +# Before you change a value here, You have to fully uninstall any previous +# installation of searx, morty and filtron services! -# SEARX_INTERNAL_HTTP="127.0.0.1:8888" -# SEARX_SETTINGS_TEMPLATE="${REPO_ROOT}/utils/templates/etc/searx/use_default_settings.yml" +# utils/searx.sh +# -------------- -# Only change, if you maintain a searx brand in your searx fork (GIT_URL) which -# is not hold by branch 'master'. The branch has to be a local branch, in the -# repository from which you install (which is most often the case). If you want -# to install branch 'foo', don't forget to run 'git branch foo origin/foo' once. -# GIT_BRANCH="${GIT_BRANCH:-master}" +# The setup of the SearXNG instance is done in the settings.yml +# (SEARX_SETTINGS_PATH). Read the remarks in [1] carefully and don't forget to +# rebuild instance's environment (make buildenv) if needed. The settings.yml +# file of an already installed instance is shown by:: +# +# $ ./utils/searx.sh --help +# ---- SearXNG instance setup (already installed) +# SEARX_SETTINGS_PATH : /etc/searx/settings.yml +# SEARX_SRC : /usr/local/searx/searx-src +# +# [1] https://searxng.github.io/searxng/admin/engines/settings.html -# filtron.sh -# ---------- +# utils/filtron.sh +# ---------------- # FILTRON_API="127.0.0.1:4005" # FILTRON_LISTEN="127.0.0.1:4004" # FILTRON_TARGET="127.0.0.1:8888" -# FILTRON_RULES_TEMPLATE="${REPO_ROOT}/utils/templates/etc/searx/use_default_settings.yml" -# morty.sh -# -------- +# utils/morty.sh +# -------------- # morty listen address # MORTY_LISTEN="127.0.0.1:3000" |