diff options
Diffstat (limited to 'utils')
| -rwxr-xr-x | utils/filtron.sh | 29 | ||||
| -rwxr-xr-x | utils/lib.sh | 35 | ||||
| -rwxr-xr-x | utils/lib_go.sh | 214 | ||||
| -rwxr-xr-x | utils/lib_install.sh | 4 | ||||
| -rwxr-xr-x | utils/lib_nvm.sh | 182 | ||||
| -rwxr-xr-x | utils/lib_static.sh | 3 | ||||
| -rwxr-xr-x | utils/morty.sh | 29 | ||||
| -rwxr-xr-x | utils/searx.sh | 23 | ||||
| -rw-r--r-- | utils/templates/etc/uwsgi/apps-archlinux/searxng.ini | 2 | ||||
| -rw-r--r-- | utils/templates/etc/uwsgi/apps-archlinux/searxng.ini:socket | 2 | ||||
| -rw-r--r-- | utils/templates/etc/uwsgi/apps-available/searxng.ini | 2 | ||||
| -rw-r--r-- | utils/templates/etc/uwsgi/apps-available/searxng.ini:socket | 2 |
12 files changed, 431 insertions, 96 deletions
diff --git a/utils/filtron.sh b/utils/filtron.sh index 4e8d6aa5d..2536214e4 100755 --- a/utils/filtron.sh +++ b/utils/filtron.sh @@ -4,6 +4,8 @@ # shellcheck source=utils/lib.sh source "$(dirname "${BASH_SOURCE[0]}")/lib.sh" +# shellcheck source=utils/lib_go.sh +source "${REPO_ROOT}/utils/lib_go.sh" # shellcheck source=utils/lib_install.sh source "${REPO_ROOT}/utils/lib_install.sh" @@ -43,8 +45,6 @@ SERVICE_GROUP="${SERVICE_USER}" GO_ENV="${SERVICE_HOME}/.go_env" GO_VERSION="go1.17.2" -GO_PKG_URL="https://golang.org/dl/${GO_VERSION}.linux-amd64.tar.gz" -GO_TAR=$(basename "$GO_PKG_URL") APACHE_FILTRON_SITE="searxng.conf" NGINX_FILTRON_SITE="searxng.conf" @@ -218,7 +218,7 @@ install_all() { rst_title "Install $SERVICE_NAME (service)" assert_user wait_key - install_go "${GO_PKG_URL}" "${GO_TAR}" "${SERVICE_USER}" + go.golang "${GO_VERSION}" "${SERVICE_USER}" wait_key install_filtron install_rules @@ -301,9 +301,7 @@ install_check() { } go_version(){ - sudo -i -u "$SERVICE_USER" <<EOF -go version | cut -d' ' -f 3 -EOF + go.version "${SERVICE_USER}" } remove_all() { @@ -338,14 +336,9 @@ EOF export SERVICE_HOME echo "export SERVICE_HOME=$SERVICE_HOME" - cat > "$GO_ENV" <<EOF -export GOPATH=\$HOME/go-apps -export PATH=\$HOME/local/go/bin:\$GOPATH/bin:\$PATH -EOF - echo "Environment $GO_ENV has been setup." - tee_stderr <<EOF | sudo -i -u "$SERVICE_USER" -grep -qFs -- 'source $GO_ENV' ~/.profile || echo 'source $GO_ENV' >> ~/.profile +touch "$GO_ENV" +grep -qFs -- 'source "$GO_ENV"' ~/.profile || echo 'source "$GO_ENV"' >> ~/.profile EOF } @@ -353,22 +346,16 @@ filtron_is_installed() { [[ -f $SERVICE_HOME/go-apps/bin/filtron ]] } -_svcpr=" ${_Yellow}|${SERVICE_USER}|${_creset} " - install_filtron() { rst_title "Install filtron in user's ~/go-apps" section echo - tee_stderr <<EOF | sudo -i -u "$SERVICE_USER" 2>&1 | prefix_stdout "$_svcpr" -go install -v github.com/asciimoo/filtron@latest -EOF + go.install github.com/searxng/filtron@latest "${SERVICE_USER}" } update_filtron() { rst_title "Update filtron" section echo - tee_stderr <<EOF | sudo -i -u "$SERVICE_USER" 2>&1 | prefix_stdout "$_svcpr" -go install -v github.com/asciimoo/filtron@latest -EOF + go.install github.com/searxng/filtron@latest "${SERVICE_USER}" } install_rules() { diff --git a/utils/lib.sh b/utils/lib.sh index 7f6ff58c4..4472b9d32 100755 --- a/utils/lib.sh +++ b/utils/lib.sh @@ -504,7 +504,6 @@ install_template() { done } - service_is_available() { # usage: service_is_available <URL> @@ -825,40 +824,6 @@ EOF build_msg GH-PAGES "deployed" } -# golang -# ------ - -go_is_available() { - - # usage: go_is_available $SERVICE_USER && echo "go is installed!" - - sudo -i -u "${1}" which go &>/dev/null -} - -install_go() { - - # usage: install_go "${GO_PKG_URL}" "${GO_TAR}" "${SERVICE_USER}" - - local _svcpr=" ${_Yellow}|${3}|${_creset} " - - rst_title "Install Go in user's HOME" section - - rst_para "download and install go binary .." - cache_download "${1}" "${2}" - - tee_stderr 0.1 <<EOF | sudo -i -u "${3}" | prefix_stdout "$_svcpr" -echo \$PATH -echo \$GOPATH -mkdir -p \$HOME/local -rm -rf \$HOME/local/go -tar -C \$HOME/local -xzf ${CACHE}/${2} -EOF - sudo -i -u "${3}" <<EOF | prefix_stdout -! which go >/dev/null && echo "ERROR - Go Installation not found in PATH!?!" -which go >/dev/null && go version && echo "congratulations -- Go installation OK :)" -EOF -} - # system accounts # --------------- diff --git a/utils/lib_go.sh b/utils/lib_go.sh new file mode 100755 index 000000000..314204e1a --- /dev/null +++ b/utils/lib_go.sh @@ -0,0 +1,214 @@ +#!/usr/bin/env bash +# -*- coding: utf-8; mode: sh indent-tabs-mode: nil -*- +# SPDX-License-Identifier: AGPL-3.0-or-later +# +# Tools to install and maintain golang [1] binaries & packages. +# +# [1] https://golang.org/doc/devel/release#policy +# +# A simple *helloworld* test with user 'my_user' : +# +# sudo -H adduser my_user +# ./manage go.golang go1.17.3 my_user +# ./manage go.install github.com/go-training/helloworld@latest my_user +# ./manage go.bash my_user +# $ helloword +# Hello World!! +# +# Don't forget to remove 'my_user': sudo -H deluser --remove-home my_user + +# shellcheck source=utils/lib.sh +. /dev/null + +# shellcheck disable=SC2034 +declare main_cmd + +# configure golang environment +# ---------------------------- + +[[ -z "${GO_VERSION}" ]] && GO_VERSION="go1.17.3" + +GO_DL_URL="https://golang.org/dl" + +# implement go functions +# ----------------------- + +go.help(){ + cat <<EOF +go.: + ls : list golang binary archives (stable) + golang : (re-) install golang binary in user's \$HOME/local folder + install : install go package in user's \$HOME/go-apps folder + bash : start bash interpreter with golang environment sourced +EOF +} + +go.ls(){ + python3 <<EOF +import sys, json, requests +resp = requests.get("${GO_DL_URL}/?mode=json&include=all") +for ver in json.loads(resp.text): + if not ver['stable']: + continue + for f in ver['files']: + if f['kind'] != 'archive' or not f['size'] or not f['sha256'] or len(f['os']) < 2: + continue + print(" %(version)-10s|%(os)-8s|%(arch)-8s|%(filename)-30s|%(size)-10s|%(sha256)s" % f) +EOF +} + +go.ver_info(){ + + # print informations about a golang distribution. To print filename + # sha256 and size of the archive that fits to your OS and host: + # + # go.ver_info "${GO_VERSION}" archive "$(go.os)" "$(go.arch)" filename sha256 size + # + # usage: go.ver_info <go-vers> <kind> <os> <arch> [filename|sha256|size] + # + # kind: [archive|source|installer] + # os: [darwin|freebsd|linux|windows] + # arch: [amd64|arm64|386|armv6l|ppc64le|s390x] + + python3 - "$@" <<EOF +import sys, json, requests +resp = requests.get("${GO_DL_URL}/?mode=json&include=all") +for ver in json.loads(resp.text): + if ver['version'] != sys.argv[1]: + continue + for f in ver['files']: + if (f['kind'] != sys.argv[2] or f['os'] != sys.argv[3] or f['arch'] != sys.argv[4]): + continue + for x in sys.argv[5:]: + print(f[x]) + sys.exit(0) +sys.exit(42) +EOF +} + +go.os() { + local OS + case "$(command uname -a)xx" in + Linux\ *) OS=linux ;; + Darwin\ *) OS=darwin ;; + FreeBSD\ *) OS=freebsd ;; + CYGWIN* | MSYS* | MINGW*) OS=windows ;; + *) die 42 "OS is unknown: $(command uname -a)" ;; + esac + echo "${OS}" +} + +go.arch() { + local ARCH + case "$(command uname -m)" in + "x86_64") ARCH=amd64 ;; + "aarch64") ARCH=arm64 ;; + "armv6" | "armv7l") ARCH=armv6l ;; + "armv8") ARCH=arm64 ;; + .*386.*) ARCH=386 ;; + ppc64*) ARCH=ppc64le ;; + *) die 42 "ARCH is unknown: $(command uname -m)" ;; + esac + echo "${ARCH}" +} + +go.golang() { + + # install golang binary in user's $HOME/local folder: + # + # go.golang ${GO_VERSION} ${SERVICE_USER} + # + # usage: go.golang <go-vers> [<username>] + + local version fname sha size user userpr + local buf=() + + version="${1:-${GO_VERSION}}" + user="${2:-${USERNAME}}" + userpr=" ${_Yellow}|${user}|${_creset} " + + rst_title "Install Go in ${user}'s HOME" section + + mapfile -t buf < <( + go.ver_info "${version}" archive "$(go.os)" "$(go.arch)" filename sha256 size + ) + + if [ ${#buf[@]} -eq 0 ]; then + die 42 "can't find info of golang version: ${version}" + fi + fname="${buf[0]}" + sha="${buf[1]}" + size="$(numfmt --to=iec "${buf[2]}")" + + info_msg "Download go binary ${fname} (${size}B)" + cache_download "${GO_DL_URL}/${fname}" "${fname}" + + pushd "${CACHE}" &> /dev/null + echo "${sha} ${fname}" > "${fname}.sha256" + if ! sha256sum -c "${fname}.sha256" >/dev/null; then + die 42 "downloaded file ${fname} checksum does not match" + else + info_msg "${fname} checksum OK" + fi + popd &> /dev/null + + info_msg "install golang" + tee_stderr 0.1 <<EOF | sudo -i -u "${user}" | prefix_stdout "${userpr}" +mkdir -p \$HOME/local +rm -rf \$HOME/local/go +tar -C \$HOME/local -xzf ${CACHE}/${fname} +echo "export GOPATH=\$HOME/go-apps" > \$HOME/.go_env +echo "export PATH=\$HOME/local/go/bin:\\\$GOPATH/bin:\\\$PATH" >> \$HOME/.go_env +EOF + info_msg "test golang installation" + sudo -i -u "${user}" <<EOF +source \$HOME/.go_env +command -v go +go version +EOF +} + +go.install() { + + # install go package in user's $HOME/go-apps folder: + # + # go.install github.com/go-training/helloworld@lates ${SERVICE_USER} + # + # usage: go.install <package> [<username>] + + local package user userpr + + package="${1}" + user="${2:-${USERNAME}}" + userpr=" ${_Yellow}|${user}|${_creset} " + + if [ -z "${package}" ]; then + die 42 "${FUNCNAME[0]}() - missing argument: <package>" + fi + tee_stderr 0.1 <<EOF | sudo -i -u "${user}" | prefix_stdout "${userpr}" +source \$HOME/.go_env +go install -v ${package} +EOF +} + +go.bash() { + + # start bash interpreter with golang environment sourced + # + # go.bash ${SERVICE_USER} + # + # usage: go.bash [<username>] + + local user + user="${1:-${USERNAME}}" + sudo -i -u "${user}" bash --init-file "~${user}/.go_env" +} + +go.version(){ + local user + user="${1:-${USERNAME}}" + sudo -i -u "${user}" <<EOF +source \$HOME/.go_env +go version | cut -d' ' -f 3 +EOF +} diff --git a/utils/lib_install.sh b/utils/lib_install.sh index 4a251c096..e8e3297c5 100755 --- a/utils/lib_install.sh +++ b/utils/lib_install.sh @@ -121,10 +121,10 @@ install_log_searx_instance() { echo -e " SEARXNG_URL : ${_BBlue}${SEARXNG_URL:-none}${_creset}" if in_container; then - # searx is listening on 127.0.0.1 and not available from outside container + # SearXNG is listening on 127.0.0.1 and not available from outside container # in containers the service is listening on 0.0.0.0 (see lxc-searx.env) echo -e "---- container setup" - echo -e " ${_BBlack}HINT:${_creset} searx only listen on loopback device" \ + echo -e " ${_BBlack}HINT:${_creset} SearXNG only listen on loopback device" \ "${_BBlack}inside${_creset} the container." for ip in $(global_IPs) ; do if [[ $ip =~ .*:.* ]]; then diff --git a/utils/lib_nvm.sh b/utils/lib_nvm.sh new file mode 100755 index 000000000..267ba8a4a --- /dev/null +++ b/utils/lib_nvm.sh @@ -0,0 +1,182 @@ +#!/usr/bin/env bash +# -*- coding: utf-8; mode: sh indent-tabs-mode: nil -*- +# SPDX-License-Identifier: AGPL-3.0-or-later +# +# Tools to install and maintain NVM versions manager for Node.js +# +# [1] https://github.com/nvm-sh/nvm + +# https://github.com/koalaman/shellcheck/issues/356#issuecomment-853515285 +# shellcheck source=utils/lib.sh +. /dev/null + +declare main_cmd + +# configure nvm environment +# ------------------------- + +NVM_LOCAL_FOLDER=.nvm + +[[ -z "${NVM_GIT_URL}" ]] && NVM_GIT_URL="https://github.com/nvm-sh/nvm.git" +[[ -z "${NVM_MIN_NODE_VER}" ]] && NVM_MIN_NODE_VER="16.13.0" + +# initalize nvm environment +# ------------------------- + +nvm.env() { + source "${NVM_DIR}/nvm.sh" + source "${NVM_DIR}/bash_completion" +} + +nvm.is_installed() { + # is true if NVM is installed / in $HOME or even in <repo-root>/.nvm + [[ -d "${NVM_DIR}" ]] +} + +if [[ -z "${NVM_DIR}" ]]; then + # nvm is not pre-intalled in $HOME. Prepare for using nvm from <repo-root> + NVM_DIR="$(git rev-parse --show-toplevel)/${NVM_LOCAL_FOLDER}" +fi +export NVM_DIR + +if nvm.is_installed; then + [ "$VERBOSE" = "1" ] && info_msg "source NVM environment from ${NVM_DIR}" + nvm.env +else + # if nvm is not installed, use this function as a wrapper + nvm() { + nvm.ensure + nvm "$@" + } +fi + +# implement nvm functions +# ----------------------- + +nvm.is_local() { + # is true if NVM is installed in <repo-root>/.nvm + [ "${NVM_DIR}" = "$(git rev-parse --show-toplevel)/${NVM_LOCAL_FOLDER}" ] +} + +nvm.min_node(){ + + # usage: nvm.min_node 16.3.0 + # + # Is true if minimal Node.js version is installed. + + local min_v + local node_v + local higher_v + + if ! command -v node >/dev/null; then + wanr_msg "Node.js is not yet installed" + return 42 + fi + + min_v="${1}" + node_v="$(node --version)" + node_v="${node_v:1}" # remove 'v' from 'v16.3.0' + if ! [ "${min_v}" = "${node_v}" ]; then + higher_v="$(echo -e "$min_v\n${node_v}" | sort -Vr | head -1)" + if [ "${min_v}" = "${higher_v}" ]; then + return 42 + fi + fi +} + +# implement nvm command line +# -------------------------- + +nvm.help(){ + cat <<EOF +nvm.: use nvm (without dot) to execute nvm commands directly + install : install NVM locally at $(git rev-parse --show-toplevel)/${NVM_LOCAL_FOLDER} + clean : remove NVM installation + status : prompt some status informations about nvm & node + nodejs : install Node.js latest LTS + cmd ... : run command ... in NVM environment + bash : start bash interpreter with NVM environment sourced +EOF +} + +nvm.install() { + local NVM_VERSION_TAG + info_msg "install (update) NVM at ${NVM_DIR}" + if [[ -d "${NVM_DIR}" ]] ; then + info_msg "already cloned at: ${NVM_DIR}" + pushd "${NVM_DIR}" &> /dev/null + git fetch --all | prefix_stdout " ${_Yellow}||${_creset} " + else + info_msg "clone: ${NVM_GIT_URL}" + git clone "${NVM_GIT_URL}" "${NVM_DIR}" 2>&1 | prefix_stdout " ${_Yellow}||${_creset} " + pushd "${NVM_DIR}" &> /dev/null + git config --local advice.detachedHead false + fi + NVM_VERSION_TAG="$(git rev-list --tags --max-count=1)" + NVM_VERSION_TAG="$(git describe --abbrev=0 --tags --match "v[0-9]*" "${NVM_VERSION_TAG}")" + info_msg "checkout ${NVM_VERSION_TAG}" + git checkout "${NVM_VERSION_TAG}" 2>&1 | prefix_stdout " ${_Yellow}||${_creset} " + popd &> /dev/null + cp "${REPO_ROOT}/.nvm_packages" "${NVM_DIR}/default-packages" + nvm.env +} + +nvm.clean() { + if ! nvm.is_installed; then + build_msg CLEAN "[NVM] not installed" + return + fi + if ! nvm.is_local; then + build_msg CLEAN "[NVM] can't remove nvm from ${NVM_DIR}" + return + fi + if [ -n "${NVM_DIR}" ]; then + build_msg CLEAN "[NVM] drop $(realpath --relative-to=. "${NVM_DIR}")/" + rm -rf "${NVM_DIR}" + fi +} + +nvm.status() { + if command -v node >/dev/null; then + info_msg "Node.js is installed at $(command -v node)" + info_msg "Node.js is version $(node --version)" + if ! nvm.min_node "${NVM_MIN_NODE_VER}"; then + warn_msg "minimal Node.js version is ${NVM_MIN_NODE_VER}" + fi + else + warn_msg "Node.js is mot installed" + fi + if command -v npm >/dev/null; then + info_msg "npm is installed at $(command -v npm)" + info_msg "npm is version $(npm --version)" + else + warn_msg "npm is not installed" + fi + if nvm.is_installed; then + info_msg "NVM is installed at ${NVM_DIR}" + else + warn_msg "NVM is not installed" + info_msg "to install NVM and Node.js (LTS) use: ${main_cmd} nvm.nodejs" + fi +} + +nvm.nodejs() { + nvm install + nvm.status +} + +nvm.bash() { + nvm.ensure + bash --init-file <(cat "${NVM_DIR}/nvm.sh" "${NVM_DIR}/bash_completion") +} + +nvm.cmd() { + nvm.ensure + "$@" +} + +nvm.ensure() { + if ! nvm.is_installed; then + nvm.install + fi +} diff --git a/utils/lib_static.sh b/utils/lib_static.sh index 0d4ba9bad..32e0dc598 100755 --- a/utils/lib_static.sh +++ b/utils/lib_static.sh @@ -11,6 +11,9 @@ STATIC_BUILT_PATHS=( searx/static/themes/simple/css searx/static/themes/simple/js searx/static/themes/simple/src/generated/pygments.less + searx/static/themes/simple/img/favicon.png + searx/templates/__common__/searxng-wordmark.min.svg + searx/templates/simple/icons.html ) static_help(){ diff --git a/utils/morty.sh b/utils/morty.sh index c04df7a0c..25263a3d4 100755 --- a/utils/morty.sh +++ b/utils/morty.sh @@ -3,6 +3,8 @@ # shellcheck source=utils/lib.sh source "$(dirname "${BASH_SOURCE[0]}")/lib.sh" +# shellcheck source=utils/lib_go.sh +source "${REPO_ROOT}/utils/lib_go.sh" # shellcheck source=utils/lib_install.sh source "${REPO_ROOT}/utils/lib_install.sh" @@ -29,8 +31,6 @@ SERVICE_ENV_DEBUG=false GO_ENV="${SERVICE_HOME}/.go_env" GO_VERSION="go1.17.2" -GO_PKG_URL="https://golang.org/dl/${GO_VERSION}.linux-amd64.tar.gz" -GO_TAR=$(basename "$GO_PKG_URL") # shellcheck disable=SC2034 CONFIG_FILES=() @@ -234,7 +234,7 @@ install_all() { rst_title "Install $SERVICE_NAME (service)" assert_user wait_key - install_go "${GO_PKG_URL}" "${GO_TAR}" "${SERVICE_USER}" + go.golang "${GO_VERSION}" "${SERVICE_USER}" wait_key install_morty wait_key @@ -306,9 +306,7 @@ install_check() { } go_version(){ - sudo -i -u "$SERVICE_USER" <<EOF -go version | cut -d' ' -f 3 -EOF + go.version "${SERVICE_USER}" } remove_all() { @@ -338,14 +336,9 @@ EOF export SERVICE_HOME echo "export SERVICE_HOME=$SERVICE_HOME" - cat > "$GO_ENV" <<EOF -export GOPATH=\$HOME/go-apps -export PATH=\$HOME/local/go/bin:\$GOPATH/bin:\$PATH -EOF - echo "Environment $GO_ENV has been setup." - tee_stderr <<EOF | sudo -i -u "$SERVICE_USER" -grep -qFs -- 'source $GO_ENV' ~/.profile || echo 'source $GO_ENV' >> ~/.profile +touch $GO_ENV +grep -qFs -- 'source "$GO_ENV"' ~/.profile || echo 'source "$GO_ENV"' >> ~/.profile EOF } @@ -353,22 +346,16 @@ morty_is_installed() { [[ -f $SERVICE_HOME/go-apps/bin/morty ]] } -_svcpr=" ${_Yellow}|${SERVICE_USER}|${_creset} " - install_morty() { rst_title "Install morty in user's ~/go-apps" section echo - tee_stderr <<EOF | sudo -i -u "$SERVICE_USER" 2>&1 | prefix_stdout "$_svcpr" -go install -v github.com/asciimoo/morty@latest -EOF + go.install github.com/asciimoo/morty@latest "${SERVICE_USER}" } update_morty() { rst_title "Update morty" section echo - tee_stderr <<EOF | sudo -i -u "$SERVICE_USER" 2>&1 | prefix_stdout "$_svcpr" -go install -v github.com/asciimoo/morty@latest -EOF + go.install github.com/asciimoo/morty@latest "${SERVICE_USER}" } set_service_env_debug() { diff --git a/utils/searx.sh b/utils/searx.sh index 79cd2f26d..09af3819d 100755 --- a/utils/searx.sh +++ b/utils/searx.sh @@ -43,8 +43,7 @@ shellcheck" BUILD_PACKAGES_debian="\ firefox graphviz imagemagick texlive-xetex librsvg2-bin texlive-latex-recommended texlive-extra-utils fonts-dejavu -latexmk -npm" +latexmk" # pacman packages SEARX_PACKAGES_arch="\ @@ -55,8 +54,7 @@ shellcheck" BUILD_PACKAGES_arch="\ firefox graphviz imagemagick texlive-bin extra/librsvg -texlive-core texlive-latexextra ttf-dejavu -npm" +texlive-core texlive-latexextra ttf-dejavu" # dnf packages SEARX_PACKAGES_fedora="\ @@ -69,8 +67,7 @@ BUILD_PACKAGES_fedora="\ firefox graphviz graphviz-gd ImageMagick librsvg2-tools texlive-xetex-bin texlive-collection-fontsrecommended texlive-collection-latex dejavu-sans-fonts dejavu-serif-fonts -dejavu-sans-mono-fonts -npm" +dejavu-sans-mono-fonts" # yum packages # @@ -154,13 +151,13 @@ usage:: shell start interactive shell from user ${SERVICE_USER} install / remove - :all: complete (de-) installation of searx service + :all: complete (de-) installation of SearXNG service :user: add/remove service user '$SERVICE_USER' ($SERVICE_HOME) :dot-config: copy ./config.sh to ${SEARX_SRC} :searx-src: clone $GIT_URL :init-src: copy files (SEARX_SRC_INIT_FILES) to ${SEARX_SRC} :pyenv: create/remove virtualenv (python) in $SEARX_PYENV - :uwsgi: install searx uWSGI application + :uwsgi: install SearXNG uWSGI application :settings: reinstall settings from ${SEARXNG_SETTINGS_PATH} :packages: install needed packages from OS package manager :buildhost: install packages from OS package manager needed by buildhosts @@ -691,7 +688,7 @@ remove_settings() { } remove_searx() { - rst_title "Drop searx sources" section + rst_title "Drop SearXNG sources" section if ask_yn "Do you really want to drop SearXNG sources ($SEARX_SRC)?"; then rm -rf "$SEARX_SRC" else @@ -1038,7 +1035,7 @@ rst-doc() { [[ $DIST_VERS =~ $DIST_ID ]] && DIST_VERS= uWSGI_distro_setup - echo -e "\n.. START searx uwsgi-description $DIST_NAME" + echo -e "\n.. START searxng uwsgi-description $DIST_NAME" case $DIST_ID-$DIST_VERS in ubuntu-*|debian-*) cat <<EOF @@ -1091,13 +1088,13 @@ EOF EOF ;; esac - echo -e ".. END searx uwsgi-description $DIST_NAME" + echo -e ".. END searxng uwsgi-description $DIST_NAME" - echo -e "\n.. START searx uwsgi-appini $DIST_NAME" + echo -e "\n.. START searxng uwsgi-appini $DIST_NAME" echo ".. code:: bash" echo eval "echo \"$(< "${TEMPLATES}/${uWSGI_APPS_AVAILABLE}/${SEARXNG_UWSGI_APP}")\"" | prefix_stdout " " - echo -e "\n.. END searx uwsgi-appini $DIST_NAME" + echo -e "\n.. END searxng uwsgi-appini $DIST_NAME" ) done diff --git a/utils/templates/etc/uwsgi/apps-archlinux/searxng.ini b/utils/templates/etc/uwsgi/apps-archlinux/searxng.ini index dcb7d1a7d..ceaec19c2 100644 --- a/utils/templates/etc/uwsgi/apps-archlinux/searxng.ini +++ b/utils/templates/etc/uwsgi/apps-archlinux/searxng.ini @@ -17,7 +17,7 @@ env = LC_ALL=C.UTF-8 # chdir to specified directory before apps loading chdir = ${SEARX_SRC}/searx -# searx configuration (settings.yml) +# SearXNG configuration (settings.yml) env = SEARXNG_SETTINGS_PATH=${SEARXNG_SETTINGS_PATH} # disable logging for privacy diff --git a/utils/templates/etc/uwsgi/apps-archlinux/searxng.ini:socket b/utils/templates/etc/uwsgi/apps-archlinux/searxng.ini:socket index 580600072..fec553165 100644 --- a/utils/templates/etc/uwsgi/apps-archlinux/searxng.ini:socket +++ b/utils/templates/etc/uwsgi/apps-archlinux/searxng.ini:socket @@ -17,7 +17,7 @@ env = LC_ALL=C.UTF-8 # chdir to specified directory before apps loading chdir = ${SEARX_SRC}/searx -# searx configuration (settings.yml) +# SearXNG configuration (settings.yml) env = SEARXNG_SETTINGS_PATH=${SEARXNG_SETTINGS_PATH} # disable logging for privacy diff --git a/utils/templates/etc/uwsgi/apps-available/searxng.ini b/utils/templates/etc/uwsgi/apps-available/searxng.ini index 440c2e97d..db11df54f 100644 --- a/utils/templates/etc/uwsgi/apps-available/searxng.ini +++ b/utils/templates/etc/uwsgi/apps-available/searxng.ini @@ -17,7 +17,7 @@ env = LC_ALL=C.UTF-8 # chdir to specified directory before apps loading chdir = ${SEARX_SRC}/searx -# searx configuration (settings.yml) +# SearXNG configuration (settings.yml) env = SEARXNG_SETTINGS_PATH=${SEARXNG_SETTINGS_PATH} # disable logging for privacy diff --git a/utils/templates/etc/uwsgi/apps-available/searxng.ini:socket b/utils/templates/etc/uwsgi/apps-available/searxng.ini:socket index 08c98cf61..a9598b52b 100644 --- a/utils/templates/etc/uwsgi/apps-available/searxng.ini:socket +++ b/utils/templates/etc/uwsgi/apps-available/searxng.ini:socket @@ -17,7 +17,7 @@ env = LC_ALL=C.UTF-8 # chdir to specified directory before apps loading chdir = ${SEARX_SRC}/searx -# searx configuration (settings.yml) +# SearXNG configuration (settings.yml) env = SEARXNG_SETTINGS_PATH=${SEARXNG_SETTINGS_PATH} # disable logging for privacy |