mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
Rename all from searx to searxng
This commit is contained in:
parent
a582cf3d82
commit
ac05f0943c
682 changed files with 58450 additions and 58450 deletions
|
|
@ -1,5 +1,5 @@
|
|||
export SEARX_URL=''
|
||||
export SEARX_PORT='8888'
|
||||
export SEARX_BIND_ADDRESS='127.0.0.1'
|
||||
export SEARXNG_URL=''
|
||||
export SEARXNG_PORT='8888'
|
||||
export SEARXNG_BIND_ADDRESS='127.0.0.1'
|
||||
export GIT_URL='https://github.com/searxng/searxng'
|
||||
export GIT_BRANCH='master'
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ repo_root = realpath(dirname(realpath(__file__)) + sep + '..')
|
|||
sys.path.insert(0, repo_root)
|
||||
|
||||
# Assure that the settings file from reposetorie's working tree is used to
|
||||
# generate the build_env, not from /etc/searx/settings.yml.
|
||||
os.environ['SEARX_SETTINGS_PATH'] = join(repo_root, 'etc', 'settings.yml')
|
||||
# generate the build_env, not from /etc/searxng/settings.yml.
|
||||
os.environ['SEARXNG_SETTINGS_PATH'] = join(repo_root, 'etc', 'settings.yml')
|
||||
|
||||
def _env(*arg, **kwargs):
|
||||
val = get_setting(*arg, **kwargs)
|
||||
|
|
@ -28,16 +28,16 @@ def _env(*arg, **kwargs):
|
|||
|
||||
name_val = [
|
||||
|
||||
('SEARX_URL' , 'server.base_url'),
|
||||
('SEARX_PORT' , 'server.port'),
|
||||
('SEARX_BIND_ADDRESS' , 'server.bind_address'),
|
||||
('SEARXNG_URL' , 'server.base_url'),
|
||||
('SEARXNG_PORT' , 'server.port'),
|
||||
('SEARXNG_BIND_ADDRESS' , 'server.bind_address'),
|
||||
|
||||
]
|
||||
|
||||
brand_env = 'utils' + sep + 'brand.env'
|
||||
|
||||
# Some defaults in the settings.yml are taken from the environment,
|
||||
# e.g. SEARX_BIND_ADDRESS (:py:obj:`searx.settings_defaults.SHEMA`). When the
|
||||
# e.g. SEARXNG_BIND_ADDRESS (:py:obj:`searxng.settings_defaults.SHEMA`). When the
|
||||
# 'brand.env' file is created these enviroment variables should be unset first::
|
||||
|
||||
_unset = object()
|
||||
|
|
@ -45,13 +45,13 @@ for name, option in name_val:
|
|||
if not os.environ.get(name, _unset) is _unset:
|
||||
del os.environ[name]
|
||||
|
||||
# After the variables are unset in the environ, we can import from the searx
|
||||
# After the variables are unset in the environ, we can import from the searxng
|
||||
# package (what will read the values from the settings.yml).
|
||||
|
||||
from searx.version import GIT_URL, GIT_BRANCH
|
||||
from searx import get_setting
|
||||
from searxng.version import GIT_URL, GIT_BRANCH
|
||||
from searxng import get_setting
|
||||
|
||||
print('build %s (settings from: %s)' % (brand_env, os.environ['SEARX_SETTINGS_PATH']))
|
||||
print('build %s (settings from: %s)' % (brand_env, os.environ['SEARXNG_SETTINGS_PATH']))
|
||||
sys.path.insert(0, repo_root)
|
||||
|
||||
with open(repo_root + sep + brand_env, 'w', encoding='utf-8') as f:
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ FILTRON_LISTEN="${FILTRON_LISTEN:-127.0.0.1:4004}"
|
|||
# server.bind_address. The default of FILTRON_TARGET is taken from the YAML
|
||||
# configuration, do not change this value without reinstalling the entire
|
||||
# SearXNG suite including filtron & morty.
|
||||
FILTRON_TARGET="${SEARX_BIND_ADDRESS}:${SEARX_PORT}"
|
||||
FILTRON_TARGET="${SEARXNG_BIND_ADDRESS}:${SEARXNG_PORT}"
|
||||
|
||||
SERVICE_NAME="filtron"
|
||||
SERVICE_USER="${SERVICE_USER:-${SERVICE_NAME}}"
|
||||
|
|
@ -45,8 +45,8 @@ GO_ENV="${SERVICE_HOME}/.go_env"
|
|||
GO_PKG_URL="https://dl.google.com/go/go1.13.5.linux-amd64.tar.gz"
|
||||
GO_TAR=$(basename "$GO_PKG_URL")
|
||||
|
||||
APACHE_FILTRON_SITE="searx.conf"
|
||||
NGINX_FILTRON_SITE="searx.conf"
|
||||
APACHE_FILTRON_SITE="searxng.conf"
|
||||
NGINX_FILTRON_SITE="searxng.conf"
|
||||
|
||||
# shellcheck disable=SC2034
|
||||
CONFIG_FILES=(
|
||||
|
|
@ -104,7 +104,7 @@ filtron rules: ${FILTRON_RULES_TEMPLATE}
|
|||
FILTRON_URL_PATH : ${FILTRON_URL_PATH}
|
||||
EOF
|
||||
|
||||
install_log_searx_instance
|
||||
install_log_searxng_instance
|
||||
[[ -n ${1} ]] && err_msg "$1"
|
||||
}
|
||||
|
||||
|
|
@ -352,7 +352,7 @@ sourced ${DOT_CONFIG} :
|
|||
FILTRON_LISTEN : ${FILTRON_LISTEN}
|
||||
FILTRON_URL_PATH : ${FILTRON_URL_PATH}
|
||||
EOF
|
||||
install_log_searx_instance
|
||||
install_log_searxng_instance
|
||||
|
||||
if service_account_is_available "$SERVICE_USER"; then
|
||||
info_msg "service account $SERVICE_USER available."
|
||||
|
|
@ -490,7 +490,7 @@ This installs a reverse proxy (ProxyPass) into apache site (${APACHE_FILTRON_SIT
|
|||
install_apache
|
||||
fi
|
||||
|
||||
"${REPO_ROOT}/utils/searx.sh" install uwsgi
|
||||
"${REPO_ROOT}/utils/searxng.sh" install uwsgi
|
||||
|
||||
apache_install_site --variant=filtron "${APACHE_FILTRON_SITE}"
|
||||
|
||||
|
|
@ -532,12 +532,12 @@ This installs a reverse proxy (ProxyPass) into nginx site (${NGINX_FILTRON_SITE}
|
|||
install_nginx
|
||||
fi
|
||||
|
||||
"${REPO_ROOT}/utils/searx.sh" install uwsgi
|
||||
"${REPO_ROOT}/utils/searxng.sh" install uwsgi
|
||||
|
||||
# shellcheck disable=SC2034
|
||||
SEARX_SRC=$("${REPO_ROOT}/utils/searx.sh" --getenv SEARX_SRC)
|
||||
SEARXNG_SRC=$("${REPO_ROOT}/utils/searxng.sh" --getenv SEARXNG_SRC)
|
||||
# shellcheck disable=SC2034
|
||||
SEARX_URL_PATH=$("${REPO_ROOT}/utils/searx.sh" --getenv SEARX_URL_PATH)
|
||||
SEARXNG_URL_PATH=$("${REPO_ROOT}/utils/searxng.sh" --getenv SEARXNG_URL_PATH)
|
||||
nginx_install_app --variant=filtron "${NGINX_FILTRON_SITE}"
|
||||
|
||||
info_msg "testing public url .."
|
||||
|
|
|
|||
|
|
@ -1654,7 +1654,7 @@ git_clone() {
|
|||
# into <path>. If repository is already cloned, pull from <branch> and
|
||||
# update working tree (if needed, the caller has to stash local changes).
|
||||
#
|
||||
# git clone https://github.com/searxng/searxng searx-src origin/master searxlogin
|
||||
# git clone https://github.com/searxng/searxng searxng-src origin/master searxlogin
|
||||
#
|
||||
|
||||
local url="$1"
|
||||
|
|
@ -1865,7 +1865,7 @@ url_replace_hostname(){
|
|||
|
||||
# to replace hostname by primary IP::
|
||||
#
|
||||
# url_replace_hostname http://searx-ubu1604/morty $(primary_ip)
|
||||
# url_replace_hostname http://searxng-ubu1604/morty $(primary_ip)
|
||||
# http://10.246.86.250/morty
|
||||
|
||||
# shellcheck disable=SC2001
|
||||
|
|
|
|||
|
|
@ -8,11 +8,11 @@
|
|||
# Initialize installation procedures:
|
||||
#
|
||||
# - Modified source_dot_config function that
|
||||
# - loads .config.sh from an existing installation (at SEARX_SRC).
|
||||
# - initialize **SEARX_SRC_INIT_FILES**
|
||||
# - loads .config.sh from an existing installation (at SEARXNG_SRC).
|
||||
# - initialize **SEARXNG_SRC_INIT_FILES**
|
||||
# - functions like:
|
||||
# - install_log_searx_instance()
|
||||
# - install_searx_get_state()
|
||||
# - install_log_searxng_instance()
|
||||
# - install_searxng_get_state()
|
||||
#
|
||||
# usage:
|
||||
# source lib_install.sh
|
||||
|
|
@ -21,72 +21,72 @@
|
|||
#
|
||||
# The utils/lib_install.sh is sourced by the installations scripts:
|
||||
#
|
||||
# - utils/searx.sh
|
||||
# - utils/searxng.sh
|
||||
# - utils/morty.sh
|
||||
# - utils/filtron.sh
|
||||
#
|
||||
# If '${SEARX_SRC}/.config.sh' exists, the modified source_dot_config() function
|
||||
# If '${SEARXNG_SRC}/.config.sh' exists, the modified source_dot_config() function
|
||||
# loads this configuration (instead of './.config.sh').
|
||||
|
||||
# **SEARX_SRC_INIT_FILES**
|
||||
# **SEARXNG_SRC_INIT_FILES**
|
||||
#
|
||||
# Array of file names to sync into a installation at $SEARX_SRC. The file names
|
||||
# are relative to the $REPO_ROOT. Set by function init_SEARX_SRC_INIT_FILES().
|
||||
# Array of file names to sync into a installation at $SEARXNG_SRC. The file names
|
||||
# are relative to the $REPO_ROOT. Set by function init_SEARXNG_SRC_INIT_FILES().
|
||||
# Most often theses are files like:
|
||||
# - .config.sh
|
||||
# - searx/settings.yml
|
||||
# - searxng/settings.yml
|
||||
# - utils/brand.env
|
||||
# - ...
|
||||
|
||||
|
||||
SEARX_SRC_INIT_FILES=()
|
||||
SEARXNG_SRC_INIT_FILES=()
|
||||
|
||||
eval orig_"$(declare -f source_dot_config)"
|
||||
|
||||
source_dot_config() {
|
||||
|
||||
# Modified source_dot_config function that
|
||||
# - loads .config.sh from an existing installation (at SEARX_SRC).
|
||||
# - initialize SEARX_SRC_INIT_FILES
|
||||
# - loads .config.sh from an existing installation (at SEARXNG_SRC).
|
||||
# - initialize SEARXNG_SRC_INIT_FILES
|
||||
|
||||
if [ -z "$eval_SEARX_SRC" ]; then
|
||||
export eval_SEARX_SRC='true'
|
||||
SEARX_SRC=$("${REPO_ROOT}/utils/searx.sh" --getenv SEARX_SRC)
|
||||
SEARX_PYENV=$("${REPO_ROOT}/utils/searx.sh" --getenv SEARX_PYENV)
|
||||
SEARX_SETTINGS_PATH=$("${REPO_ROOT}/utils/searx.sh" --getenv SEARX_SETTINGS_PATH)
|
||||
if [ ! -r "${SEARX_SRC}" ]; then
|
||||
info_msg "not yet cloned: ${SEARX_SRC}"
|
||||
if [ -z "$eval_SEARXNG_SRC" ]; then
|
||||
export eval_SEARXNG_SRC='true'
|
||||
SEARXNG_SRC=$("${REPO_ROOT}/utils/searxng.sh" --getenv SEARXNG_SRC)
|
||||
SEARXNG_PYENV=$("${REPO_ROOT}/utils/searxng.sh" --getenv SEARXNG_PYENV)
|
||||
SEARXNG_SETTINGS_PATH=$("${REPO_ROOT}/utils/searxng.sh" --getenv SEARXNG_SETTINGS_PATH)
|
||||
if [ ! -r "${SEARXNG_SRC}" ]; then
|
||||
info_msg "not yet cloned: ${SEARXNG_SRC}"
|
||||
orig_source_dot_config
|
||||
return 0
|
||||
fi
|
||||
info_msg "using instance at: ${SEARX_SRC}"
|
||||
info_msg "using instance at: ${SEARXNG_SRC}"
|
||||
|
||||
# set and log DOT_CONFIG
|
||||
if [ -r "${SEARX_SRC}/.config.sh" ]; then
|
||||
info_msg "switching to ${SEARX_SRC}/.config.sh"
|
||||
DOT_CONFIG="${SEARX_SRC}/.config.sh"
|
||||
if [ -r "${SEARXNG_SRC}/.config.sh" ]; then
|
||||
info_msg "switching to ${SEARXNG_SRC}/.config.sh"
|
||||
DOT_CONFIG="${SEARXNG_SRC}/.config.sh"
|
||||
else
|
||||
info_msg "using local config: ${DOT_CONFIG}"
|
||||
fi
|
||||
init_SEARX_SRC_INIT_FILES
|
||||
init_SEARXNG_SRC_INIT_FILES
|
||||
fi
|
||||
}
|
||||
|
||||
init_SEARX_SRC_INIT_FILES(){
|
||||
# init environment SEARX_SRC_INIT_FILES
|
||||
init_SEARXNG_SRC_INIT_FILES(){
|
||||
# init environment SEARXNG_SRC_INIT_FILES
|
||||
|
||||
# Monitor modified files in the working-tree from the local repository, only
|
||||
# if the local file differs to the corresponding file in the instance. Most
|
||||
# often theses are files like:
|
||||
#
|
||||
# - .config.sh
|
||||
# - searx/settings.yml
|
||||
# - searxng/settings.yml
|
||||
# - utils/brand.env
|
||||
# - ...
|
||||
|
||||
# keep list empty if there is no installation
|
||||
SEARX_SRC_INIT_FILES=()
|
||||
if [ ! -r "$SEARX_SRC" ]; then
|
||||
SEARXNG_SRC_INIT_FILES=()
|
||||
if [ ! -r "$SEARXNG_SRC" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
|
|
@ -100,31 +100,31 @@ init_SEARX_SRC_INIT_FILES(){
|
|||
if [ -z "$fname" ]; then
|
||||
continue
|
||||
fi
|
||||
if [ -r "${SEARX_SRC}/${fname}" ]; then
|
||||
# diff "${REPO_ROOT}/${fname}" "${SEARX_SRC}/${fname}"
|
||||
if ! cmp --silent "${REPO_ROOT}/${fname}" "${SEARX_SRC}/${fname}"; then
|
||||
SEARX_SRC_INIT_FILES+=("${fname}")
|
||||
if [ -r "${SEARXNG_SRC}/${fname}" ]; then
|
||||
# diff "${REPO_ROOT}/${fname}" "${SEARXNG_SRC}/${fname}"
|
||||
if ! cmp --silent "${REPO_ROOT}/${fname}" "${SEARXNG_SRC}/${fname}"; then
|
||||
SEARXNG_SRC_INIT_FILES+=("${fname}")
|
||||
info_msg "local clone (workingtree), modified file: ./$fname"
|
||||
msg="to update use: sudo -H ./utils/searx.sh install init-src"
|
||||
msg="to update use: sudo -H ./utils/searxng.sh install init-src"
|
||||
fi
|
||||
fi
|
||||
done <<< "$(git diff --name-only)"
|
||||
[ -n "$msg" ] && info_msg "$msg"
|
||||
}
|
||||
|
||||
install_log_searx_instance() {
|
||||
install_log_searxng_instance() {
|
||||
|
||||
echo -e "---- SearXNG instance setup ${_BBlue}(status: $(install_searx_get_state))${_creset}"
|
||||
echo -e " SEARX_SETTINGS_PATH : ${_BBlue}${SEARX_SETTINGS_PATH}${_creset}"
|
||||
echo -e " SSEARX_PYENV : ${_BBlue}${SEARX_PYENV}${_creset}"
|
||||
echo -e " SEARX_SRC : ${_BBlue}${SEARX_SRC:-none}${_creset}"
|
||||
echo -e " SEARX_URL : ${_BBlue}${SEARX_URL:-none}${_creset}"
|
||||
echo -e "---- SearXNG instance setup ${_BBlue}(status: $(install_searxng_get_state))${_creset}"
|
||||
echo -e " SEARXNG_SETTINGS_PATH : ${_BBlue}${SEARXNG_SETTINGS_PATH}${_creset}"
|
||||
echo -e " SSEARXNG_PYENV : ${_BBlue}${SEARXNG_PYENV}${_creset}"
|
||||
echo -e " SEARXNG_SRC : ${_BBlue}${SEARXNG_SRC:-none}${_creset}"
|
||||
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
|
||||
# in containers the service is listening on 0.0.0.0 (see lxc-searx.env)
|
||||
# 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-searxng.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
|
||||
|
|
@ -137,37 +137,37 @@ install_log_searx_instance() {
|
|||
fi
|
||||
}
|
||||
|
||||
install_searx_get_state(){
|
||||
install_searxng_get_state(){
|
||||
|
||||
# usage: install_searx_get_state
|
||||
# usage: install_searxng_get_state
|
||||
#
|
||||
# Prompts a string indicating the status of the installation procedure
|
||||
#
|
||||
# missing-searx-clone:
|
||||
# There is no clone at ${SEARX_SRC}
|
||||
# missing-searx-pyenv:
|
||||
# There is no pyenv in ${SEARX_PYENV}
|
||||
# missing-searxng-clone:
|
||||
# There is no clone at ${SEARXNG_SRC}
|
||||
# missing-searxng-pyenv:
|
||||
# There is no pyenv in ${SEARXNG_PYENV}
|
||||
# installer-modified:
|
||||
# There are files modified locally in the installer (clone),
|
||||
# see ${SEARX_SRC_INIT_FILES} description.
|
||||
# see ${SEARXNG_SRC_INIT_FILES} description.
|
||||
# python-installed:
|
||||
# Scripts can be executed in instance's environment
|
||||
# - user: ${SERVICE_USER}
|
||||
# - pyenv: ${SEARX_PYENV}
|
||||
# - pyenv: ${SEARXNG_PYENV}
|
||||
|
||||
if ! [ -r "${SEARX_SRC}" ]; then
|
||||
echo "missing-searx-clone"
|
||||
if ! [ -r "${SEARXNG_SRC}" ]; then
|
||||
echo "missing-searxng-clone"
|
||||
return
|
||||
fi
|
||||
if ! [ -f "${SEARX_PYENV}/bin/activate" ]; then
|
||||
echo "missing-searx-pyenv"
|
||||
if ! [ -f "${SEARXNG_PYENV}/bin/activate" ]; then
|
||||
echo "missing-searxng-pyenv"
|
||||
return
|
||||
fi
|
||||
if ! [ -r "${SEARX_SETTINGS_PATH}" ]; then
|
||||
if ! [ -r "${SEARXNG_SETTINGS_PATH}" ]; then
|
||||
echo "missing-settings"
|
||||
return
|
||||
fi
|
||||
if ! [ ${#SEARX_SRC_INIT_FILES[*]} -eq 0 ]; then
|
||||
if ! [ ${#SEARXNG_SRC_INIT_FILES[*]} -eq 0 ]; then
|
||||
echo "installer-modified"
|
||||
return
|
||||
fi
|
||||
|
|
@ -180,20 +180,20 @@ install_searx_get_state(){
|
|||
# shellcheck source=utils/brand.env
|
||||
source "${REPO_ROOT}/utils/brand.env"
|
||||
|
||||
# SEARX_URL aka PUBLIC_URL: the public URL of the instance (e.g.
|
||||
# "https://example.org/searx"). The value is taken from environment $SEARX_URL
|
||||
# SEARXNG_URL aka PUBLIC_URL: the public URL of the instance (e.g.
|
||||
# "https://example.org/searxng"). The value is taken from environment $SEARXNG_URL
|
||||
# in ./utils/brand.env. This variable is a empty string if server.base_url in
|
||||
# the settings.yml is set to 'false'.
|
||||
|
||||
SEARX_URL="${SEARX_URL:-http://$(uname -n)}"
|
||||
SEARXNG_URL="${SEARXNG_URL:-http://$(uname -n)}"
|
||||
if in_container; then
|
||||
# hint: Linux containers do not have DNS entries, lets use IPs
|
||||
SEARX_URL="http://$(primary_ip)"
|
||||
SEARXNG_URL="http://$(primary_ip)"
|
||||
fi
|
||||
PUBLIC_URL="${SEARX_URL}"
|
||||
PUBLIC_URL="${SEARXNG_URL}"
|
||||
|
||||
source_dot_config
|
||||
|
||||
# shellcheck source=utils/lxc-searx.env
|
||||
source "${REPO_ROOT}/utils/lxc-searx.env"
|
||||
# shellcheck source=utils/lxc-searxng.env
|
||||
source "${REPO_ROOT}/utils/lxc-searxng.env"
|
||||
in_container && lxc_set_suite_env
|
||||
|
|
|
|||
|
|
@ -4,13 +4,13 @@
|
|||
|
||||
STATIC_BUILD_COMMIT="[build] /static"
|
||||
STATIC_BUILT_PATHS=(
|
||||
searx/static/themes/oscar/css
|
||||
searx/static/themes/oscar/js
|
||||
searx/static/themes/oscar/src/generated/pygments-logicodev.less
|
||||
searx/static/themes/oscar/src/generated/pygments-pointhi.less
|
||||
searx/static/themes/simple/css
|
||||
searx/static/themes/simple/js
|
||||
searx/static/themes/simple/src/generated/pygments.less
|
||||
searxng/static/themes/oscar/css
|
||||
searxng/static/themes/oscar/js
|
||||
searxng/static/themes/oscar/src/generated/pygments-logicodev.less
|
||||
searxng/static/themes/oscar/src/generated/pygments-pointhi.less
|
||||
searxng/static/themes/simple/css
|
||||
searxng/static/themes/simple/js
|
||||
searxng/static/themes/simple/src/generated/pygments.less
|
||||
)
|
||||
|
||||
static_help(){
|
||||
|
|
|
|||
|
|
@ -11,11 +11,11 @@
|
|||
# ----------------------------------------------------------------------------
|
||||
|
||||
# shellcheck disable=SC2034
|
||||
LXC_SUITE_NAME="searx"
|
||||
LXC_SUITE_NAME="searxng"
|
||||
lxc_set_suite_env() {
|
||||
# name of https://images.linuxcontainers.org
|
||||
export LINUXCONTAINERS_ORG_NAME="${LINUXCONTAINERS_ORG_NAME:-images}"
|
||||
export LXC_HOST_PREFIX="${LXC_SUITE_NAME:-searx}"
|
||||
export LXC_HOST_PREFIX="${LXC_SUITE_NAME:-searxng}"
|
||||
export LXC_SUITE=(
|
||||
|
||||
# to disable containers, comment out lines ..
|
||||
|
|
@ -35,10 +35,10 @@ lxc_set_suite_env() {
|
|||
"$LINUXCONTAINERS_ORG_NAME:centos/7" "centos7"
|
||||
)
|
||||
|
||||
PUBLIC_URL="${PUBLIC_URL:-http://$(uname -n)/searx}"
|
||||
PUBLIC_URL="${PUBLIC_URL:-http://$(uname -n)/searxng}"
|
||||
if in_container; then
|
||||
# container hostnames do not have a DNS entry: use primary IP!
|
||||
PUBLIC_URL="http://$(primary_ip)/searx"
|
||||
PUBLIC_URL="http://$(primary_ip)/searxng"
|
||||
|
||||
# make GUEST's services public to the HOST
|
||||
FILTRON_API="0.0.0.0:4005"
|
||||
|
|
@ -55,7 +55,7 @@ lxc_suite_install_info() {
|
|||
lxc_set_suite_env
|
||||
cat <<EOF
|
||||
LXC suite: ${LXC_SUITE_NAME} --> ${PUBLIC_URL}
|
||||
suite includes searx, morty & filtron
|
||||
suite includes searxng, morty & filtron
|
||||
suite images:
|
||||
$(echo " ${LOCAL_IMAGES[*]}" | $FMT)
|
||||
suite containers:
|
||||
|
|
@ -69,7 +69,7 @@ lxc_suite_install() {
|
|||
lxc_set_suite_env
|
||||
FORCE_TIMEOUT=0
|
||||
export FORCE_TIMEOUT
|
||||
"${LXC_REPO_ROOT}/utils/searx.sh" install all
|
||||
"${LXC_REPO_ROOT}/utils/searxng.sh" install all
|
||||
"${LXC_REPO_ROOT}/utils/morty.sh" install all
|
||||
"${LXC_REPO_ROOT}/utils/filtron.sh" install all
|
||||
|
||||
|
|
@ -9,7 +9,7 @@ source_dot_config
|
|||
source "${REPO_ROOT}/utils/brand.env"
|
||||
|
||||
# load environment of the LXC suite
|
||||
LXC_ENV="${LXC_ENV:-${REPO_ROOT}/utils/lxc-searx.env}"
|
||||
LXC_ENV="${LXC_ENV:-${REPO_ROOT}/utils/lxc-searxng.env}"
|
||||
source "$LXC_ENV"
|
||||
lxc_set_suite_env
|
||||
|
||||
|
|
@ -528,7 +528,7 @@ lxc_install_boilerplate() {
|
|||
|
||||
# usage: lxc_install_boilerplate <container-name> <string: shell commands ..>
|
||||
#
|
||||
# usage: lxc_install_boilerplate searx-archlinux "${archlinux_boilerplate}"
|
||||
# usage: lxc_install_boilerplate searxng-archlinux "${archlinux_boilerplate}"
|
||||
|
||||
local container_name="$1"
|
||||
local boilerplate_script="$2"
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ usage::
|
|||
$(basename "$0") option [debug-on|debug-off|new-key]
|
||||
$(basename "$0") apache [install|remove]
|
||||
$(basename "$0") nginx [install|remove]
|
||||
$(basename "$0") info [searx]
|
||||
$(basename "$0") info [searxng]
|
||||
|
||||
shell
|
||||
start interactive shell from user ${SERVICE_USER}
|
||||
|
|
@ -88,9 +88,9 @@ sourced ${DOT_CONFIG} :
|
|||
MORTY_LISTEN: : ${MORTY_LISTEN}
|
||||
EOF
|
||||
|
||||
install_log_searx_instance
|
||||
install_log_searxng_instance
|
||||
if in_container; then
|
||||
# in containers the service is listening on 0.0.0.0 (see lxc-searx.env)
|
||||
# in containers the service is listening on 0.0.0.0 (see lxc-searxng.env)
|
||||
for ip in $(global_IPs) ; do
|
||||
if [[ $ip =~ .*:.* ]]; then
|
||||
echo " container URL (IPv6): http://[${ip#*|}]:3000/"
|
||||
|
|
@ -111,7 +111,7 @@ info_searx() {
|
|||
cat <<EOF
|
||||
To activate result and image proxy in SearXNG read:
|
||||
https://searxng.github.io/searxng/admin/morty.html
|
||||
Check settings in file ${SEARX_SETTINGS_PATH} ...
|
||||
Check settings in file ${SEARXNG_SETTINGS_PATH} ...
|
||||
result_proxy:
|
||||
url : ${PUBLIC_URL_MORTY}
|
||||
server:
|
||||
|
|
@ -191,7 +191,7 @@ main() {
|
|||
esac ;;
|
||||
info)
|
||||
case $2 in
|
||||
searx) info_searx ;;
|
||||
searxng) info_searxng ;;
|
||||
*) usage "$_usage"; exit 42;;
|
||||
esac ;;
|
||||
option)
|
||||
|
|
@ -236,8 +236,8 @@ install_all() {
|
|||
fi
|
||||
info_searx
|
||||
if ask_yn "Add image and result proxy to SearXNG settings.yml?" Yn; then
|
||||
"${REPO_ROOT}/utils/searx.sh" option result-proxy "${PUBLIC_URL_MORTY}" "${MORTY_KEY}"
|
||||
"${REPO_ROOT}/utils/searx.sh" option image-proxy-on
|
||||
"${REPO_ROOT}/utils/searxng.sh" option result-proxy "${PUBLIC_URL_MORTY}" "${MORTY_KEY}"
|
||||
"${REPO_ROOT}/utils/searxng.sh" option image-proxy-on
|
||||
fi
|
||||
|
||||
if ask_yn "Do you want to inspect the installation?" Ny; then
|
||||
|
|
@ -340,7 +340,7 @@ sourced ${DOT_CONFIG} :
|
|||
MORTY_LISTEN: : ${MORTY_LISTEN}
|
||||
|
||||
EOF
|
||||
install_log_searx_instance
|
||||
install_log_searxng_instance
|
||||
|
||||
if service_account_is_available "$SERVICE_USER"; then
|
||||
info_msg "service account $SERVICE_USER available."
|
||||
|
|
@ -425,8 +425,8 @@ set_new_key() {
|
|||
MSG="${_Green}press any [${_BCyan}KEY${_Green}] to continue // stop with [${_BCyan}CTRL-C${_creset}]" wait_key
|
||||
|
||||
systemd_install_service "${SERVICE_NAME}" "${SERVICE_SYSTEMD_UNIT}"
|
||||
"${REPO_ROOT}/utils/searx.sh" option result-proxy "${PUBLIC_URL_MORTY}" "${MORTY_KEY}"
|
||||
"${REPO_ROOT}/utils/searx.sh" option image-proxy-on
|
||||
"${REPO_ROOT}/utils/searxng.sh" option result-proxy "${PUBLIC_URL_MORTY}" "${MORTY_KEY}"
|
||||
"${REPO_ROOT}/utils/searxng.sh" option image-proxy-on
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -484,12 +484,12 @@ This installs a reverse proxy (ProxyPass) into nginx site (${NGINX_MORTY_SITE})"
|
|||
install_nginx
|
||||
fi
|
||||
|
||||
"${REPO_ROOT}/utils/searx.sh" install uwsgi
|
||||
"${REPO_ROOT}/utils/searxng.sh" install uwsgi
|
||||
|
||||
# shellcheck disable=SC2034
|
||||
SEARX_SRC=$("${REPO_ROOT}/utils/searx.sh" --getenv SEARX_SRC)
|
||||
SEARXNG_SRC=$("${REPO_ROOT}/utils/searxng.sh" --getenv SEARXNG_SRC)
|
||||
# shellcheck disable=SC2034
|
||||
SEARX_URL_PATH=$("${REPO_ROOT}/utils/searx.sh" --getenv SEARX_URL_PATH)
|
||||
SEARXNG_URL_PATH=$("${REPO_ROOT}/utils/searxng.sh" --getenv SEARXNG_URL_PATH)
|
||||
nginx_install_app "${NGINX_MORTY_SITE}"
|
||||
|
||||
info_msg "testing public url .."
|
||||
|
|
|
|||
|
|
@ -12,13 +12,13 @@ source "${REPO_ROOT}/utils/lib_install.sh"
|
|||
# config
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
SEARX_INTERNAL_HTTP="${SEARX_BIND_ADDRESS}:${SEARX_PORT}"
|
||||
SEARXNG_INTERNAL_HTTP="${SEARXNG_BIND_ADDRESS}:${SEARXNG_PORT}"
|
||||
|
||||
SEARX_URL_PATH="${SEARX_URL_PATH:-$(echo "${PUBLIC_URL}" \
|
||||
SEARXNG_URL_PATH="${SEARXNG_URL_PATH:-$(echo "${PUBLIC_URL}" \
|
||||
| sed -e 's,^.*://[^/]*\(/.*\),\1,g')}"
|
||||
[[ "${SEARX_URL_PATH}" == "${PUBLIC_URL}" ]] && SEARX_URL_PATH=/
|
||||
[[ "${SEARXNG_URL_PATH}" == "${PUBLIC_URL}" ]] && SEARXNG_URL_PATH=/
|
||||
|
||||
SERVICE_NAME="searx"
|
||||
SERVICE_NAME="searxng"
|
||||
SERVICE_USER="${SERVICE_USER:-${SERVICE_NAME}}"
|
||||
SERVICE_HOME_BASE="${SERVICE_HOME_BASE:-/usr/local}"
|
||||
SERVICE_HOME="${SERVICE_HOME_BASE}/${SERVICE_USER}"
|
||||
|
|
@ -26,15 +26,15 @@ SERVICE_HOME="${SERVICE_HOME_BASE}/${SERVICE_USER}"
|
|||
SERVICE_GROUP="${SERVICE_USER}"
|
||||
|
||||
GIT_BRANCH="${GIT_BRANCH:-master}"
|
||||
SEARX_PYENV="${SERVICE_HOME}/searx-pyenv"
|
||||
SEARX_SRC="${SERVICE_HOME}/searx-src"
|
||||
SEARX_SETTINGS_PATH="/etc/searx/settings.yml"
|
||||
SEARX_UWSGI_APP="searx.ini"
|
||||
SEARXNG_PYENV="${SERVICE_HOME}/searxng-pyenv"
|
||||
SEARXNG_SRC="${SERVICE_HOME}/searxng-src"
|
||||
SEARXNG_SETTINGS_PATH="/etc/searxng/settings.yml"
|
||||
SEARXNG_UWSGI_APP="searxng.ini"
|
||||
# shellcheck disable=SC2034
|
||||
SEARX_UWSGI_SOCKET="/run/uwsgi/app/searx/socket"
|
||||
SEARXNG_UWSGI_SOCKET="/run/uwsgi/app/searxng/socket"
|
||||
|
||||
# apt packages
|
||||
SEARX_PACKAGES_debian="\
|
||||
SEARXNG_PACKAGES_debian="\
|
||||
python3-dev python3-babel python3-venv
|
||||
uwsgi uwsgi-plugin-python3
|
||||
git build-essential libxslt-dev zlib1g-dev libffi-dev libssl-dev
|
||||
|
|
@ -47,7 +47,7 @@ latexmk
|
|||
npm"
|
||||
|
||||
# pacman packages
|
||||
SEARX_PACKAGES_arch="\
|
||||
SEARXNG_PACKAGES_arch="\
|
||||
python python-pip python-lxml python-babel
|
||||
uwsgi uwsgi-plugin-python
|
||||
git base-devel libxml2
|
||||
|
|
@ -59,7 +59,7 @@ texlive-core texlive-latexextra ttf-dejavu
|
|||
npm"
|
||||
|
||||
# dnf packages
|
||||
SEARX_PACKAGES_fedora="\
|
||||
SEARXNG_PACKAGES_fedora="\
|
||||
python python-pip python-lxml python-babel
|
||||
uwsgi uwsgi-plugin-python3
|
||||
git @development-tools libxml2
|
||||
|
|
@ -79,7 +79,7 @@ npm"
|
|||
# CentOS-7 as developer & build platform (the inital patch which brought
|
||||
# CentOS-7 supports was not intended to be a developer platform).
|
||||
|
||||
SEARX_PACKAGES_centos="\
|
||||
SEARXNG_PACKAGES_centos="\
|
||||
python36 python36-pip python36-lxml python-babel
|
||||
uwsgi uwsgi-plugin-python3
|
||||
git @development-tools libxml2
|
||||
|
|
@ -93,44 +93,44 @@ dejavu-sans-mono-fonts"
|
|||
|
||||
case $DIST_ID-$DIST_VERS in
|
||||
ubuntu-16.04|ubuntu-18.04)
|
||||
SEARX_PACKAGES="${SEARX_PACKAGES_debian}"
|
||||
SEARXNG_PACKAGES="${SEARXNG_PACKAGES_debian}"
|
||||
BUILD_PACKAGES="${BUILD_PACKAGES_debian}"
|
||||
APACHE_PACKAGES="$APACHE_PACKAGES libapache2-mod-proxy-uwsgi"
|
||||
;;
|
||||
ubuntu-20.04)
|
||||
# https://askubuntu.com/a/1224710
|
||||
SEARX_PACKAGES="${SEARX_PACKAGES_debian} python-is-python3"
|
||||
SEARXNG_PACKAGES="${SEARXNG_PACKAGES_debian} python-is-python3"
|
||||
BUILD_PACKAGES="${BUILD_PACKAGES_debian}"
|
||||
;;
|
||||
ubuntu-*|debian-*)
|
||||
SEARX_PACKAGES="${SEARX_PACKAGES_debian}"
|
||||
SEARXNG_PACKAGES="${SEARXNG_PACKAGES_debian}"
|
||||
BUILD_PACKAGES="${BUILD_PACKAGES_debian}"
|
||||
;;
|
||||
arch-*)
|
||||
SEARX_PACKAGES="${SEARX_PACKAGES_arch}"
|
||||
SEARXNG_PACKAGES="${SEARXNG_PACKAGES_arch}"
|
||||
BUILD_PACKAGES="${BUILD_PACKAGES_arch}"
|
||||
;;
|
||||
fedora-*)
|
||||
SEARX_PACKAGES="${SEARX_PACKAGES_fedora}"
|
||||
SEARXNG_PACKAGES="${SEARXNG_PACKAGES_fedora}"
|
||||
BUILD_PACKAGES="${BUILD_PACKAGES_fedora}"
|
||||
;;
|
||||
centos-7)
|
||||
SEARX_PACKAGES="${SEARX_PACKAGES_centos}"
|
||||
SEARXNG_PACKAGES="${SEARXNG_PACKAGES_centos}"
|
||||
BUILD_PACKAGES="${BUILD_PACKAGES_centos}"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Apache Settings
|
||||
APACHE_SEARX_SITE="searx.conf"
|
||||
APACHE_SEARXNG_SITE="searxng.conf"
|
||||
|
||||
# shellcheck disable=SC2034
|
||||
CONFIG_FILES=(
|
||||
"${uWSGI_APPS_AVAILABLE}/${SEARX_UWSGI_APP}"
|
||||
"${uWSGI_APPS_AVAILABLE}/${SEARXNG_UWSGI_APP}"
|
||||
)
|
||||
|
||||
# shellcheck disable=SC2034
|
||||
CONFIG_BACKUP_ENCRYPTED=(
|
||||
"${SEARX_SETTINGS_PATH}"
|
||||
"${SEARXNG_SETTINGS_PATH}"
|
||||
)
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
|
|
@ -141,9 +141,9 @@ usage() {
|
|||
cat <<EOF
|
||||
usage::
|
||||
$(basename "$0") shell
|
||||
$(basename "$0") install [all|init-src|dot-config|user|searx-src|pyenv|uwsgi|packages|settings|buildhost]
|
||||
$(basename "$0") update [searx]
|
||||
$(basename "$0") remove [all|user|pyenv|searx-src]
|
||||
$(basename "$0") install [all|init-src|dot-config|user|searxng-src|pyenv|uwsgi|packages|settings|buildhost]
|
||||
$(basename "$0") update [searxng]
|
||||
$(basename "$0") remove [all|user|pyenv|searxng-src]
|
||||
$(basename "$0") activate [service]
|
||||
$(basename "$0") deactivate [service]
|
||||
$(basename "$0") inspect [service|settings <key>]
|
||||
|
|
@ -153,17 +153,17 @@ 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
|
||||
:settings: reinstall settings from ${SEARX_SETTINGS_PATH}
|
||||
:dot-config: copy ./config.sh to ${SEARXNG_SRC}
|
||||
:searxng-src: clone $GIT_URL
|
||||
:init-src: copy files (SEARXNG_SRC_INIT_FILES) to ${SEARXNG_SRC}
|
||||
:pyenv: create/remove virtualenv (python) in $SEARXNG_PYENV
|
||||
: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
|
||||
update searx
|
||||
update searxng
|
||||
Update SearXNG installation ($SERVICE_HOME)
|
||||
activate service
|
||||
activate and start service daemon (systemd unit)
|
||||
|
|
@ -171,7 +171,7 @@ deactivate service
|
|||
stop and deactivate service daemon (systemd unit)
|
||||
inspect
|
||||
:service: run some small tests and inspect service's status and log
|
||||
:settings: inspect YAML setting <key> from SearXNG instance (${SEARX_SRC})
|
||||
:settings: inspect YAML setting <key> from SearXNG instance (${SEARXNG_SRC})
|
||||
option
|
||||
set one of the available options
|
||||
apache
|
||||
|
|
@ -182,7 +182,7 @@ apache
|
|||
SERVICE_HOME : ${SERVICE_HOME}
|
||||
EOF
|
||||
|
||||
install_log_searx_instance
|
||||
install_log_searxng_instance
|
||||
[[ -n ${1} ]] && err_msg "$1"
|
||||
}
|
||||
|
||||
|
|
@ -229,16 +229,16 @@ main() {
|
|||
verify_continue_install
|
||||
create_pyenv
|
||||
;;
|
||||
searx-src)
|
||||
rst_title "SearXNG (install searx-src)"
|
||||
searxng-src)
|
||||
rst_title "SearXNG (install searxng-src)"
|
||||
verify_continue_install
|
||||
assert_user
|
||||
clone_searx
|
||||
install_DOT_CONFIG
|
||||
init_SEARX_SRC
|
||||
init_SEARXNG_SRC
|
||||
;;
|
||||
init-src)
|
||||
init_SEARX_SRC
|
||||
init_SEARXNG_SRC
|
||||
;;
|
||||
dot-config)
|
||||
install_DOT_CONFIG
|
||||
|
|
@ -249,18 +249,18 @@ main() {
|
|||
uwsgi)
|
||||
rst_title "SearXNG (install uwsgi)"
|
||||
verify_continue_install
|
||||
install_searx_uwsgi
|
||||
if ! service_is_available "http://${SEARX_INTERNAL_HTTP}"; then
|
||||
err_msg "URL http://${SEARX_INTERNAL_HTTP} not available, check SearXNG & uwsgi setup!"
|
||||
install_searxng_uwsgi
|
||||
if ! service_is_available "http://${SEARXNG_INTERNAL_HTTP}"; then
|
||||
err_msg "URL http://${SEARXNG_INTERNAL_HTTP} not available, check SearXNG & uwsgi setup!"
|
||||
fi
|
||||
;;
|
||||
packages)
|
||||
rst_title "SearXNG (install packages)"
|
||||
pkg_install "$SEARX_PACKAGES"
|
||||
pkg_install "$SEARXNG_PACKAGES"
|
||||
;;
|
||||
buildhost)
|
||||
rst_title "SearXNG (install buildhost)"
|
||||
pkg_install "$SEARX_PACKAGES"
|
||||
pkg_install "$SEARXNG_PACKAGES"
|
||||
pkg_install "$BUILD_PACKAGES"
|
||||
;;
|
||||
*) usage "$_usage"; exit 42;;
|
||||
|
|
@ -268,7 +268,7 @@ main() {
|
|||
update)
|
||||
sudo_or_exit
|
||||
case $2 in
|
||||
searx) update_searx;;
|
||||
searxng) update_searx;;
|
||||
*) usage "$_usage"; exit 42;;
|
||||
esac ;;
|
||||
remove)
|
||||
|
|
@ -278,7 +278,7 @@ main() {
|
|||
all) remove_all;;
|
||||
user) drop_service_account "${SERVICE_USER}";;
|
||||
pyenv) remove_pyenv ;;
|
||||
searx-src) remove_searx ;;
|
||||
searxng-src) remove_searxng ;;
|
||||
*) usage "$_usage"; exit 42;;
|
||||
esac ;;
|
||||
activate)
|
||||
|
|
@ -321,7 +321,7 @@ _service_prefix=" ${_Yellow}|$SERVICE_USER|${_creset} "
|
|||
install_all() {
|
||||
rst_title "Install SearXNG (service)"
|
||||
verify_continue_install
|
||||
pkg_install "$SEARX_PACKAGES"
|
||||
pkg_install "$SEARXNG_PACKAGES"
|
||||
wait_key
|
||||
assert_user
|
||||
wait_key
|
||||
|
|
@ -329,7 +329,7 @@ install_all() {
|
|||
wait_key
|
||||
install_DOT_CONFIG
|
||||
wait_key
|
||||
init_SEARX_SRC
|
||||
init_SEARXNG_SRC
|
||||
wait_key
|
||||
create_pyenv
|
||||
wait_key
|
||||
|
|
@ -337,9 +337,9 @@ install_all() {
|
|||
wait_key
|
||||
test_local_searx
|
||||
wait_key
|
||||
install_searx_uwsgi
|
||||
if ! service_is_available "http://${SEARX_INTERNAL_HTTP}"; then
|
||||
err_msg "URL http://${SEARX_INTERNAL_HTTP} not available, check SearXNG & uwsgi setup!"
|
||||
install_searxng_uwsgi
|
||||
if ! service_is_available "http://${SEARXNG_INTERNAL_HTTP}"; then
|
||||
err_msg "URL http://${SEARXNG_INTERNAL_HTTP} not available, check SearXNG & uwsgi setup!"
|
||||
fi
|
||||
if ask_yn "Do you want to inspect the installation?" Ny; then
|
||||
inspect_service
|
||||
|
|
@ -351,7 +351,7 @@ update_searx() {
|
|||
|
||||
echo
|
||||
tee_stderr 0.3 <<EOF | sudo -H -u "${SERVICE_USER}" -i 2>&1 | prefix_stdout "$_service_prefix"
|
||||
cd ${SEARX_SRC}
|
||||
cd ${SEARXNG_SRC}
|
||||
git checkout -B "$GIT_BRANCH"
|
||||
git pull
|
||||
pip install -U pip
|
||||
|
|
@ -361,7 +361,7 @@ pip install -U pyyaml
|
|||
pip install -U -e .
|
||||
EOF
|
||||
install_settings
|
||||
uWSGI_restart "$SEARX_UWSGI_APP"
|
||||
uWSGI_restart "$SEARXNG_UWSGI_APP"
|
||||
}
|
||||
|
||||
remove_all() {
|
||||
|
|
@ -374,7 +374,7 @@ installations that were installed with this script."
|
|||
if ! ask_yn "Do you really want to deinstall SearXNG?"; then
|
||||
return
|
||||
fi
|
||||
remove_searx_uwsgi
|
||||
remove_searxng_uwsgi
|
||||
drop_service_account "${SERVICE_USER}"
|
||||
remove_settings
|
||||
wait_key
|
||||
|
|
@ -405,7 +405,7 @@ EOF
|
|||
}
|
||||
|
||||
clone_is_available() {
|
||||
[[ -f "$SEARX_SRC/.git/config" ]]
|
||||
[[ -f "$SEARXNG_SRC/.git/config" ]]
|
||||
}
|
||||
|
||||
# shellcheck disable=SC2164
|
||||
|
|
@ -429,12 +429,12 @@ clone_searx() {
|
|||
warn_msg "take into account, installing branch $GIT_BRANCH while current branch is $(git rev-parse --abbrev-ref HEAD)"
|
||||
fi
|
||||
export SERVICE_HOME
|
||||
git_clone "$REPO_ROOT" "$SEARX_SRC" \
|
||||
git_clone "$REPO_ROOT" "$SEARXNG_SRC" \
|
||||
"$GIT_BRANCH" "$SERVICE_USER"
|
||||
|
||||
pushd "${SEARX_SRC}" > /dev/null
|
||||
pushd "${SEARXNG_SRC}" > /dev/null
|
||||
tee_stderr 0.1 <<EOF | sudo -H -u "${SERVICE_USER}" -i 2>&1 | prefix_stdout "$_service_prefix"
|
||||
cd "${SEARX_SRC}"
|
||||
cd "${SEARXNG_SRC}"
|
||||
git remote set-url origin ${GIT_URL}
|
||||
git config user.email "$ADMIN_EMAIL"
|
||||
git config user.name "$ADMIN_NAME"
|
||||
|
|
@ -448,16 +448,16 @@ prompt_installation_status(){
|
|||
# shellcheck disable=SC2034
|
||||
local GIT_URL GIT_BRANCH VERSION_STRING VERSION_TAG
|
||||
local ret_val state branch remote remote_url
|
||||
state="$(install_searx_get_state)"
|
||||
state="$(install_searxng_get_state)"
|
||||
|
||||
case $state in
|
||||
missing-searx-clone|missing-searx-pyenv)
|
||||
info_msg "${_BBlue}(status: $(install_searx_get_state))${_creset}"
|
||||
missing-searxng-clone|missing-searxng-pyenv)
|
||||
info_msg "${_BBlue}(status: $(install_searxng_get_state))${_creset}"
|
||||
return 0
|
||||
;;
|
||||
*)
|
||||
info_msg "SearXNG instance already installed at: $SEARX_SRC"
|
||||
info_msg "status: ${_BBlue}$(install_searx_get_state)${_creset} "
|
||||
info_msg "SearXNG instance already installed at: $SEARXNG_SRC"
|
||||
info_msg "status: ${_BBlue}$(install_searxng_get_state)${_creset} "
|
||||
branch="$(git name-rev --name-only HEAD)"
|
||||
remote="$(git config branch."${branch}".remote)"
|
||||
remote_url="$(git config remote."${remote}".url)"
|
||||
|
|
@ -493,12 +493,12 @@ prompt_installation_setting(){
|
|||
# Prompts the value of the (YAML) setting in the SearXNG instance.
|
||||
|
||||
local _state
|
||||
_state="$(install_searx_get_state)"
|
||||
_state="$(install_searxng_get_state)"
|
||||
case $_state in
|
||||
python-installed|installer-modified)
|
||||
sudo -H -u "${SERVICE_USER}" "${SEARX_PYENV}/bin/python" <<EOF
|
||||
sudo -H -u "${SERVICE_USER}" "${SEARXNG_PYENV}/bin/python" <<EOF
|
||||
import sys
|
||||
from searx import get_setting
|
||||
from searxng import get_setting
|
||||
name = "${1}"
|
||||
unset = object()
|
||||
value = get_setting(name, unset)
|
||||
|
|
@ -522,35 +522,35 @@ get_installed_version_variables() {
|
|||
# Set variables VERSION_STRING, VERSION_TAG, GIT_URL, GIT_BRANCH
|
||||
|
||||
local _state
|
||||
_state="$(install_searx_get_state)"
|
||||
_state="$(install_searxng_get_state)"
|
||||
case $_state in
|
||||
python-installed|installer-modified)
|
||||
sudo -H -u "${SERVICE_USER}" "${SEARX_PYENV}/bin/python" -m searx.version;;
|
||||
sudo -H -u "${SERVICE_USER}" "${SEARXNG_PYENV}/bin/python" -m searxng.version;;
|
||||
*)
|
||||
return 42
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
init_SEARX_SRC(){
|
||||
rst_title "Update instance: ${SEARX_SRC}/" section
|
||||
init_SEARXNG_SRC(){
|
||||
rst_title "Update instance: ${SEARXNG_SRC}/" section
|
||||
|
||||
if ! clone_is_available; then
|
||||
err_msg "you have to install SearXNG first"
|
||||
return 1
|
||||
fi
|
||||
|
||||
init_SEARX_SRC_INIT_FILES
|
||||
init_SEARXNG_SRC_INIT_FILES
|
||||
|
||||
if [ ${#SEARX_SRC_INIT_FILES[*]} -eq 0 ]; then
|
||||
info_msg "no files registered in SEARX_SRC_INIT_FILES"
|
||||
if [ ${#SEARXNG_SRC_INIT_FILES[*]} -eq 0 ]; then
|
||||
info_msg "no files registered in SEARXNG_SRC_INIT_FILES"
|
||||
return 2
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "Update instance with file(s) from: ${REPO_ROOT}"
|
||||
echo
|
||||
for i in "${SEARX_SRC_INIT_FILES[@]}"; do
|
||||
for i in "${SEARXNG_SRC_INIT_FILES[@]}"; do
|
||||
echo "- $i"
|
||||
done
|
||||
echo
|
||||
|
|
@ -558,7 +558,7 @@ init_SEARX_SRC(){
|
|||
if ! ask_yn "Do you really want to update these files in the instance?" Yn; then
|
||||
return 42
|
||||
fi
|
||||
for fname in "${SEARX_SRC_INIT_FILES[@]}"; do
|
||||
for fname in "${SEARXNG_SRC_INIT_FILES[@]}"; do
|
||||
while true; do
|
||||
choose_one _reply "choose next step with file ${fname}" \
|
||||
"replace file" \
|
||||
|
|
@ -571,19 +571,19 @@ init_SEARX_SRC(){
|
|||
break
|
||||
;;
|
||||
"replace file")
|
||||
info_msg "copy: ${REPO_ROOT}/${fname} --> ${SEARX_SRC}/${fname}"
|
||||
cp "${REPO_ROOT}/${fname}" "${SEARX_SRC}/${fname}"
|
||||
info_msg "copy: ${REPO_ROOT}/${fname} --> ${SEARXNG_SRC}/${fname}"
|
||||
cp "${REPO_ROOT}/${fname}" "${SEARXNG_SRC}/${fname}"
|
||||
break
|
||||
;;
|
||||
"diff files")
|
||||
$DIFF_CMD "${SEARX_SRC}/${fname}" "${REPO_ROOT}/${fname}"
|
||||
$DIFF_CMD "${SEARXNG_SRC}/${fname}" "${REPO_ROOT}/${fname}"
|
||||
;;
|
||||
"interactive shell")
|
||||
backup_file "${SEARX_SRC}/${fname}"
|
||||
backup_file "${SEARXNG_SRC}/${fname}"
|
||||
echo -e "// edit ${_Red}${dst}${_creset} to your needs"
|
||||
echo -e "// exit with [${_BCyan}CTRL-D${_creset}]"
|
||||
sudo -H -u "${SERVICE_USER}" -i
|
||||
$DIFF_CMD "${SEARX_SRC}/${fname}" "${REPO_ROOT}/${fname}"
|
||||
$DIFF_CMD "${SEARXNG_SRC}/${fname}" "${REPO_ROOT}/${fname}"
|
||||
echo
|
||||
echo -e "// ${_BBlack}did you edit file ...${_creset}"
|
||||
echo -en "// ${_Red}${dst}${_creset}"
|
||||
|
|
@ -597,32 +597,32 @@ init_SEARX_SRC(){
|
|||
}
|
||||
|
||||
install_DOT_CONFIG(){
|
||||
rst_title "Update instance: ${SEARX_SRC}/.config.sh" section
|
||||
rst_title "Update instance: ${SEARXNG_SRC}/.config.sh" section
|
||||
|
||||
if cmp --silent "${REPO_ROOT}/.config.sh" "${SEARX_SRC}/.config.sh"; then
|
||||
info_msg "${SEARX_SRC}/.config.sh is up to date"
|
||||
if cmp --silent "${REPO_ROOT}/.config.sh" "${SEARXNG_SRC}/.config.sh"; then
|
||||
info_msg "${SEARXNG_SRC}/.config.sh is up to date"
|
||||
return 0
|
||||
fi
|
||||
|
||||
diff "${REPO_ROOT}/.config.sh" "${SEARX_SRC}/.config.sh"
|
||||
diff "${REPO_ROOT}/.config.sh" "${SEARXNG_SRC}/.config.sh"
|
||||
if ! ask_yn "Do you want to copy file .config.sh into instance?" Yn; then
|
||||
return 42
|
||||
fi
|
||||
backup_file "${SEARX_SRC}/.config.sh"
|
||||
cp "${REPO_ROOT}/.config.sh" "${SEARX_SRC}/.config.sh"
|
||||
backup_file "${SEARXNG_SRC}/.config.sh"
|
||||
cp "${REPO_ROOT}/.config.sh" "${SEARXNG_SRC}/.config.sh"
|
||||
}
|
||||
|
||||
install_settings() {
|
||||
rst_title "${SEARX_SETTINGS_PATH}" section
|
||||
rst_title "${SEARXNG_SETTINGS_PATH}" section
|
||||
|
||||
if ! clone_is_available; then
|
||||
err_msg "you have to install SearXNG first"
|
||||
exit 42
|
||||
fi
|
||||
|
||||
mkdir -p "$(dirname "${SEARX_SETTINGS_PATH}")"
|
||||
mkdir -p "$(dirname "${SEARXNG_SETTINGS_PATH}")"
|
||||
install_template --no-eval \
|
||||
"${SEARX_SETTINGS_PATH}" \
|
||||
"${SEARXNG_SETTINGS_PATH}" \
|
||||
"${SERVICE_USER}" "${SERVICE_GROUP}"
|
||||
configure_searx
|
||||
}
|
||||
|
|
@ -630,36 +630,36 @@ install_settings() {
|
|||
remove_settings() {
|
||||
rst_title "remove SearXNG settings" section
|
||||
echo
|
||||
info_msg "delete ${SEARX_SETTINGS_PATH}"
|
||||
rm -f "${SEARX_SETTINGS_PATH}"
|
||||
info_msg "delete ${SEARXNG_SETTINGS_PATH}"
|
||||
rm -f "${SEARXNG_SETTINGS_PATH}"
|
||||
}
|
||||
|
||||
remove_searx() {
|
||||
rst_title "Drop searx sources" section
|
||||
if ask_yn "Do you really want to drop SearXNG sources ($SEARX_SRC)?"; then
|
||||
rm -rf "$SEARX_SRC"
|
||||
rst_title "Drop searxng sources" section
|
||||
if ask_yn "Do you really want to drop SearXNG sources ($SEARXNG_SRC)?"; then
|
||||
rm -rf "$SEARXNG_SRC"
|
||||
else
|
||||
rst_para "Leave SearXNG sources unchanged."
|
||||
fi
|
||||
}
|
||||
|
||||
pyenv_is_available() {
|
||||
[[ -f "${SEARX_PYENV}/bin/activate" ]]
|
||||
[[ -f "${SEARXNG_PYENV}/bin/activate" ]]
|
||||
}
|
||||
|
||||
create_pyenv() {
|
||||
rst_title "Create virtualenv (python)" section
|
||||
echo
|
||||
if [[ ! -f "${SEARX_SRC}/manage" ]]; then
|
||||
if [[ ! -f "${SEARXNG_SRC}/manage" ]]; then
|
||||
err_msg "to create pyenv for SearXNG, SearXNG has to be cloned first"
|
||||
return 42
|
||||
fi
|
||||
info_msg "create pyenv in ${SEARX_PYENV}"
|
||||
info_msg "create pyenv in ${SEARXNG_PYENV}"
|
||||
tee_stderr 0.1 <<EOF | sudo -H -u "${SERVICE_USER}" -i 2>&1 | prefix_stdout "$_service_prefix"
|
||||
rm -rf "${SEARX_PYENV}"
|
||||
python3 -m venv "${SEARX_PYENV}"
|
||||
grep -qFs -- 'source ${SEARX_PYENV}/bin/activate' ~/.profile \
|
||||
|| echo 'source ${SEARX_PYENV}/bin/activate' >> ~/.profile
|
||||
rm -rf "${SEARXNG_PYENV}"
|
||||
python3 -m venv "${SEARXNG_PYENV}"
|
||||
grep -qFs -- 'source ${SEARXNG_PYENV}/bin/activate' ~/.profile \
|
||||
|| echo 'source ${SEARXNG_PYENV}/bin/activate' >> ~/.profile
|
||||
EOF
|
||||
info_msg "inspect python's virtual environment"
|
||||
tee_stderr 0.1 <<EOF | sudo -H -u "${SERVICE_USER}" -i 2>&1 | prefix_stdout "$_service_prefix"
|
||||
|
|
@ -672,31 +672,31 @@ pip install -U pip
|
|||
pip install -U setuptools
|
||||
pip install -U wheel
|
||||
pip install -U pyyaml
|
||||
cd ${SEARX_SRC}
|
||||
cd ${SEARXNG_SRC}
|
||||
pip install -e .
|
||||
EOF
|
||||
}
|
||||
|
||||
remove_pyenv() {
|
||||
rst_title "Remove virtualenv (python)" section
|
||||
if ! ask_yn "Do you really want to drop ${SEARX_PYENV} ?"; then
|
||||
if ! ask_yn "Do you really want to drop ${SEARXNG_PYENV} ?"; then
|
||||
return
|
||||
fi
|
||||
info_msg "remove pyenv activation from ~/.profile"
|
||||
tee_stderr 0.1 <<EOF | sudo -H -u "${SERVICE_USER}" -i 2>&1 | prefix_stdout "$_service_prefix"
|
||||
grep -v 'source ${SEARX_PYENV}/bin/activate' ~/.profile > ~/.profile.##
|
||||
grep -v 'source ${SEARXNG_PYENV}/bin/activate' ~/.profile > ~/.profile.##
|
||||
mv ~/.profile.## ~/.profile
|
||||
EOF
|
||||
rm -rf "${SEARX_PYENV}"
|
||||
rm -rf "${SEARXNG_PYENV}"
|
||||
}
|
||||
|
||||
configure_searx() {
|
||||
rst_title "Configure SearXNG" section
|
||||
rst_para "Setup SearXNG config located at $SEARX_SETTINGS_PATH"
|
||||
rst_para "Setup SearXNG config located at $SEARXNG_SETTINGS_PATH"
|
||||
echo
|
||||
tee_stderr 0.1 <<EOF | sudo -H -i 2>&1 | prefix_stdout "$_service_prefix"
|
||||
cd ${SEARX_SRC}
|
||||
sed -i -e "s/ultrasecretkey/$(openssl rand -hex 16)/g" "$SEARX_SETTINGS_PATH"
|
||||
cd ${SEARXNG_SRC}
|
||||
sed -i -e "s/ultrasecretkey/$(openssl rand -hex 16)/g" "$SEARXNG_SETTINGS_PATH"
|
||||
EOF
|
||||
}
|
||||
|
||||
|
|
@ -704,86 +704,86 @@ test_local_searx() {
|
|||
rst_title "Testing SearXNG instance localy" section
|
||||
echo
|
||||
|
||||
if service_is_available "http://${SEARX_INTERNAL_HTTP}" &>/dev/null; then
|
||||
err_msg "URL/port http://${SEARX_INTERNAL_HTTP} is already in use, you"
|
||||
if service_is_available "http://${SEARXNG_INTERNAL_HTTP}" &>/dev/null; then
|
||||
err_msg "URL/port http://${SEARXNG_INTERNAL_HTTP} is already in use, you"
|
||||
err_msg "should stop that service before starting local tests!"
|
||||
if ! ask_yn "Continue with local tests?"; then
|
||||
return
|
||||
fi
|
||||
fi
|
||||
sed -i -e "s/debug: false/debug: true/g" "$SEARX_SETTINGS_PATH"
|
||||
sed -i -e "s/debug: false/debug: true/g" "$SEARXNG_SETTINGS_PATH"
|
||||
tee_stderr 0.1 <<EOF | sudo -H -u "${SERVICE_USER}" -i 2>&1 | prefix_stdout "$_service_prefix"
|
||||
export SEARX_SETTINGS_PATH="${SEARX_SETTINGS_PATH}"
|
||||
cd ${SEARX_SRC}
|
||||
timeout 10 python searx/webapp.py &
|
||||
export SEARXNG_SETTINGS_PATH="${SEARXNG_SETTINGS_PATH}"
|
||||
cd ${SEARXNG_SRC}
|
||||
timeout 10 python searxng/webapp.py &
|
||||
sleep 3
|
||||
curl --location --verbose --head --insecure $SEARX_INTERNAL_HTTP
|
||||
curl --location --verbose --head --insecure $SEARXNG_INTERNAL_HTTP
|
||||
EOF
|
||||
sed -i -e "s/debug: true/debug: false/g" "$SEARX_SETTINGS_PATH"
|
||||
sed -i -e "s/debug: true/debug: false/g" "$SEARXNG_SETTINGS_PATH"
|
||||
}
|
||||
|
||||
install_searx_uwsgi() {
|
||||
rst_title "Install SearXNG's uWSGI app (searx.ini)" section
|
||||
install_searxng_uwsgi() {
|
||||
rst_title "Install SearXNG's uWSGI app (searxng.ini)" section
|
||||
echo
|
||||
install_uwsgi
|
||||
uWSGI_install_app "$SEARX_UWSGI_APP"
|
||||
uWSGI_install_app "$SEARXNG_UWSGI_APP"
|
||||
}
|
||||
|
||||
remove_searx_uwsgi() {
|
||||
rst_title "Remove SearXNG's uWSGI app (searx.ini)" section
|
||||
remove_searxng_uwsgi() {
|
||||
rst_title "Remove SearXNG's uWSGI app (searxng.ini)" section
|
||||
echo
|
||||
uWSGI_remove_app "$SEARX_UWSGI_APP"
|
||||
uWSGI_remove_app "$SEARXNG_UWSGI_APP"
|
||||
}
|
||||
|
||||
activate_service() {
|
||||
rst_title "Activate SearXNG (service)" section
|
||||
echo
|
||||
uWSGI_enable_app "$SEARX_UWSGI_APP"
|
||||
uWSGI_restart "$SEARX_UWSGI_APP"
|
||||
uWSGI_enable_app "$SEARXNG_UWSGI_APP"
|
||||
uWSGI_restart "$SEARXNG_UWSGI_APP"
|
||||
}
|
||||
|
||||
deactivate_service() {
|
||||
rst_title "De-Activate SearXNG (service)" section
|
||||
echo
|
||||
uWSGI_disable_app "$SEARX_UWSGI_APP"
|
||||
uWSGI_restart "$SEARX_UWSGI_APP"
|
||||
uWSGI_disable_app "$SEARXNG_UWSGI_APP"
|
||||
uWSGI_restart "$SEARXNG_UWSGI_APP"
|
||||
}
|
||||
|
||||
enable_image_proxy() {
|
||||
info_msg "try to enable image_proxy ..."
|
||||
tee_stderr 0.1 <<EOF | sudo -H -i 2>&1 | prefix_stdout "$_service_prefix"
|
||||
cd ${SEARX_SRC}
|
||||
sed -i -e "s/image_proxy: false/image_proxy: true/g" "$SEARX_SETTINGS_PATH"
|
||||
cd ${SEARXNG_SRC}
|
||||
sed -i -e "s/image_proxy: false/image_proxy: true/g" "$SEARXNG_SETTINGS_PATH"
|
||||
EOF
|
||||
uWSGI_restart "$SEARX_UWSGI_APP"
|
||||
uWSGI_restart "$SEARXNG_UWSGI_APP"
|
||||
}
|
||||
|
||||
disable_image_proxy() {
|
||||
info_msg "try to enable image_proxy ..."
|
||||
tee_stderr 0.1 <<EOF | sudo -H -i 2>&1 | prefix_stdout "$_service_prefix"
|
||||
cd ${SEARX_SRC}
|
||||
sed -i -e "s/image_proxy: true/image_proxy: false/g" "$SEARX_SETTINGS_PATH"
|
||||
cd ${SEARXNG_SRC}
|
||||
sed -i -e "s/image_proxy: true/image_proxy: false/g" "$SEARXNG_SETTINGS_PATH"
|
||||
EOF
|
||||
uWSGI_restart "$SEARX_UWSGI_APP"
|
||||
uWSGI_restart "$SEARXNG_UWSGI_APP"
|
||||
}
|
||||
|
||||
enable_debug() {
|
||||
warn_msg "Do not enable debug in production environments!!"
|
||||
info_msg "try to enable debug mode ..."
|
||||
tee_stderr 0.1 <<EOF | sudo -H -i 2>&1 | prefix_stdout "$_service_prefix"
|
||||
cd ${SEARX_SRC}
|
||||
sed -i -e "s/debug: false/debug: true/g" "$SEARX_SETTINGS_PATH"
|
||||
cd ${SEARXNG_SRC}
|
||||
sed -i -e "s/debug: false/debug: true/g" "$SEARXNG_SETTINGS_PATH"
|
||||
EOF
|
||||
uWSGI_restart "$SEARX_UWSGI_APP"
|
||||
uWSGI_restart "$SEARXNG_UWSGI_APP"
|
||||
}
|
||||
|
||||
disable_debug() {
|
||||
info_msg "try to disable debug mode ..."
|
||||
tee_stderr 0.1 <<EOF | sudo -H -i 2>&1 | prefix_stdout "$_service_prefix"
|
||||
cd ${SEARX_SRC}
|
||||
sed -i -e "s/debug: true/debug: false/g" "$SEARX_SETTINGS_PATH"
|
||||
cd ${SEARXNG_SRC}
|
||||
sed -i -e "s/debug: true/debug: false/g" "$SEARXNG_SETTINGS_PATH"
|
||||
EOF
|
||||
uWSGI_restart "$SEARX_UWSGI_APP"
|
||||
uWSGI_restart "$SEARXNG_UWSGI_APP"
|
||||
}
|
||||
|
||||
set_result_proxy() {
|
||||
|
|
@ -791,8 +791,8 @@ set_result_proxy() {
|
|||
# usage: set_result_proxy <URL> [<key>]
|
||||
|
||||
info_msg "try to set result proxy: '$1' ($2)"
|
||||
cp "${SEARX_SETTINGS_PATH}" "${SEARX_SETTINGS_PATH}.bak"
|
||||
_set_result_proxy "$1" "$2" > "${SEARX_SETTINGS_PATH}"
|
||||
cp "${SEARXNG_SETTINGS_PATH}" "${SEARXNG_SETTINGS_PATH}.bak"
|
||||
_set_result_proxy "$1" "$2" > "${SEARXNG_SETTINGS_PATH}"
|
||||
}
|
||||
|
||||
_set_result_proxy() {
|
||||
|
|
@ -829,7 +829,7 @@ _set_result_proxy() {
|
|||
fi
|
||||
fi
|
||||
echo "$line"
|
||||
done < "${SEARX_SETTINGS_PATH}.bak"
|
||||
done < "${SEARXNG_SETTINGS_PATH}.bak"
|
||||
}
|
||||
|
||||
function has_substring() {
|
||||
|
|
@ -843,7 +843,7 @@ sourced ${DOT_CONFIG} :
|
|||
SERVICE_USER : ${SERVICE_USER}
|
||||
SERVICE_HOME : ${SERVICE_HOME}
|
||||
EOF
|
||||
install_log_searx_instance
|
||||
install_log_searxng_instance
|
||||
|
||||
if service_account_is_available "$SERVICE_USER"; then
|
||||
info_msg "Service account $SERVICE_USER exists."
|
||||
|
|
@ -863,24 +863,24 @@ EOF
|
|||
err_msg "~$SERVICE_USER: Missing SearXNG software!"
|
||||
fi
|
||||
|
||||
if uWSGI_app_enabled "$SEARX_UWSGI_APP"; then
|
||||
info_msg "uWSGI app $SEARX_UWSGI_APP is enabled."
|
||||
if uWSGI_app_enabled "$SEARXNG_UWSGI_APP"; then
|
||||
info_msg "uWSGI app $SEARXNG_UWSGI_APP is enabled."
|
||||
else
|
||||
err_msg "uWSGI app $SEARX_UWSGI_APP not enabled!"
|
||||
err_msg "uWSGI app $SEARXNG_UWSGI_APP not enabled!"
|
||||
fi
|
||||
|
||||
uWSGI_app_available "$SEARX_UWSGI_APP" \
|
||||
|| err_msg "uWSGI app $SEARX_UWSGI_APP not available!"
|
||||
uWSGI_app_available "$SEARXNG_UWSGI_APP" \
|
||||
|| err_msg "uWSGI app $SEARXNG_UWSGI_APP not available!"
|
||||
|
||||
if in_container; then
|
||||
lxc_suite_info
|
||||
else
|
||||
info_msg "public URL --> ${PUBLIC_URL}"
|
||||
info_msg "internal URL --> http://${SEARX_INTERNAL_HTTP}"
|
||||
info_msg "internal URL --> http://${SEARXNG_INTERNAL_HTTP}"
|
||||
fi
|
||||
|
||||
if ! service_is_available "http://${SEARX_INTERNAL_HTTP}"; then
|
||||
err_msg "uWSGI app (service) at http://${SEARX_INTERNAL_HTTP} is not available!"
|
||||
if ! service_is_available "http://${SEARXNG_INTERNAL_HTTP}"; then
|
||||
err_msg "uWSGI app (service) at http://${SEARXNG_INTERNAL_HTTP} is not available!"
|
||||
MSG="${_Green}[${_BCyan}CTRL-C${_Green}] to stop or [${_BCyan}KEY${_Green}] to continue"\
|
||||
wait_key
|
||||
fi
|
||||
|
|
@ -919,7 +919,7 @@ EOF
|
|||
while true; do
|
||||
trap break 2
|
||||
case $DIST_ID-$DIST_VERS in
|
||||
ubuntu-*|debian-*) tail -f /var/log/uwsgi/app/searx.log ;;
|
||||
ubuntu-*|debian-*) tail -f /var/log/uwsgi/app/searxng.log ;;
|
||||
arch-*) journalctl -f -u "uwsgi@${SERVICE_NAME%.*}" ;;
|
||||
fedora-*|centos-7) journalctl -f -u uwsgi ;;
|
||||
esac
|
||||
|
|
@ -932,7 +932,7 @@ EOF
|
|||
}
|
||||
|
||||
install_apache_site() {
|
||||
rst_title "Install Apache site $APACHE_SEARX_SITE"
|
||||
rst_title "Install Apache site $APACHE_SEARXNG_SITE"
|
||||
|
||||
rst_para "\
|
||||
This installs the SearXNG uwsgi app as apache site. If your server is public to
|
||||
|
|
@ -947,11 +947,11 @@ excessively bot queries."
|
|||
install_apache
|
||||
fi
|
||||
|
||||
apache_install_site --variant=uwsgi "${APACHE_SEARX_SITE}"
|
||||
apache_install_site --variant=uwsgi "${APACHE_SEARXNG_SITE}"
|
||||
|
||||
rst_title "Install SearXNG's uWSGI app (searx.ini)" section
|
||||
rst_title "Install SearXNG's uWSGI app (searxng.ini)" section
|
||||
echo
|
||||
uWSGI_install_app --variant=socket "$SEARX_UWSGI_APP"
|
||||
uWSGI_install_app --variant=socket "$SEARXNG_UWSGI_APP"
|
||||
|
||||
if ! service_is_available "${PUBLIC_URL}"; then
|
||||
err_msg "Public service at ${PUBLIC_URL} is not available!"
|
||||
|
|
@ -960,10 +960,10 @@ excessively bot queries."
|
|||
|
||||
remove_apache_site() {
|
||||
|
||||
rst_title "Remove Apache site ${APACHE_SEARX_SITE}"
|
||||
rst_title "Remove Apache site ${APACHE_SEARXNG_SITE}"
|
||||
|
||||
rst_para "\
|
||||
This removes apache site ${APACHE_SEARX_SITE}."
|
||||
This removes apache site ${APACHE_SEARXNG_SITE}."
|
||||
|
||||
! apache_is_installed && err_msg "Apache is not installed."
|
||||
|
||||
|
|
@ -971,22 +971,22 @@ This removes apache site ${APACHE_SEARX_SITE}."
|
|||
return
|
||||
fi
|
||||
|
||||
apache_remove_site "${APACHE_SEARX_SITE}"
|
||||
apache_remove_site "${APACHE_SEARXNG_SITE}"
|
||||
|
||||
rst_title "Remove SearXNG's uWSGI app (searx.ini)" section
|
||||
rst_title "Remove SearXNG's uWSGI app (searxng.ini)" section
|
||||
echo
|
||||
uWSGI_remove_app "$SEARX_UWSGI_APP"
|
||||
uWSGI_remove_app "$SEARXNG_UWSGI_APP"
|
||||
}
|
||||
|
||||
rst-doc() {
|
||||
local debian="${SEARX_PACKAGES_debian}"
|
||||
local arch="${SEARX_PACKAGES_arch}"
|
||||
local fedora="${SEARX_PACKAGES_fedora}"
|
||||
local centos="${SEARX_PACKAGES_centos}"
|
||||
local debian="${SEARXNG_PACKAGES_debian}"
|
||||
local arch="${SEARXNG_PACKAGES_arch}"
|
||||
local fedora="${SEARXNG_PACKAGES_fedora}"
|
||||
local centos="${SEARXNG_PACKAGES_centos}"
|
||||
local debian_build="${BUILD_PACKAGES_debian}"
|
||||
local arch_build="${BUILD_PACKAGES_arch}"
|
||||
local fedora_build="${BUILD_PACKAGES_fedora}"
|
||||
local centos_build="${SEARX_PACKAGES_centos}"
|
||||
local centos_build="${SEARXNG_PACKAGES_centos}"
|
||||
debian="$(echo "${debian}" | sed 's/.*/ & \\/' | sed '$ s/.$//')"
|
||||
arch="$(echo "${arch}" | sed 's/.*/ & \\/' | sed '$ s/.$//')"
|
||||
fedora="$(echo "${fedora}" | sed 's/.*/ & \\/' | sed '$ s/.$//')"
|
||||
|
|
@ -996,7 +996,7 @@ rst-doc() {
|
|||
fedora_build="$(echo "${fedora_build}" | sed 's/.*/ & \\/' | sed '$ s/.$//')"
|
||||
centos_build="$(echo "${centos_build}" | sed 's/.*/ & \\/' | sed '$ s/.$//')"
|
||||
|
||||
eval "echo \"$(< "${REPO_ROOT}/docs/build-templates/searx.rst")\""
|
||||
eval "echo \"$(< "${REPO_ROOT}/docs/build-templates/searxng.rst")\""
|
||||
|
||||
# I use ubuntu-20.04 here to demonstrate that versions are also suported,
|
||||
# normaly debian-* and ubuntu-* are most the same.
|
||||
|
|
@ -1008,7 +1008,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
|
||||
|
|
@ -1019,12 +1019,12 @@ rst-doc() {
|
|||
# For uWSGI debian uses the LSB init process, this might be changed
|
||||
# one day, see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=833067
|
||||
|
||||
create ${uWSGI_APPS_AVAILABLE}/${SEARX_UWSGI_APP}
|
||||
enable: sudo -H ln -s ${uWSGI_APPS_AVAILABLE}/${SEARX_UWSGI_APP} ${uWSGI_APPS_ENABLED}/
|
||||
start: sudo -H service uwsgi start ${SEARX_UWSGI_APP%.*}
|
||||
restart: sudo -H service uwsgi restart ${SEARX_UWSGI_APP%.*}
|
||||
stop: sudo -H service uwsgi stop ${SEARX_UWSGI_APP%.*}
|
||||
disable: sudo -H rm ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
|
||||
create ${uWSGI_APPS_AVAILABLE}/${SEARXNG_UWSGI_APP}
|
||||
enable: sudo -H ln -s ${uWSGI_APPS_AVAILABLE}/${SEARXNG_UWSGI_APP} ${uWSGI_APPS_ENABLED}/
|
||||
start: sudo -H service uwsgi start ${SEARXNG_UWSGI_APP%.*}
|
||||
restart: sudo -H service uwsgi restart ${SEARXNG_UWSGI_APP%.*}
|
||||
stop: sudo -H service uwsgi stop ${SEARXNG_UWSGI_APP%.*}
|
||||
disable: sudo -H rm ${uWSGI_APPS_ENABLED}/${SEARXNG_UWSGI_APP}
|
||||
|
||||
EOF
|
||||
;;
|
||||
|
|
@ -1037,12 +1037,12 @@ EOF
|
|||
# - http://0pointer.de/blog/projects/instances.html
|
||||
# - https://uwsgi-docs.readthedocs.io/en/latest/Systemd.html#one-service-per-app-in-systemd
|
||||
|
||||
create: ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
|
||||
enable: sudo -H systemctl enable uwsgi@${SEARX_UWSGI_APP%.*}
|
||||
start: sudo -H systemctl start uwsgi@${SEARX_UWSGI_APP%.*}
|
||||
restart: sudo -H systemctl restart uwsgi@${SEARX_UWSGI_APP%.*}
|
||||
stop: sudo -H systemctl stop uwsgi@${SEARX_UWSGI_APP%.*}
|
||||
disable: sudo -H systemctl disable uwsgi@${SEARX_UWSGI_APP%.*}
|
||||
create: ${uWSGI_APPS_ENABLED}/${SEARXNG_UWSGI_APP}
|
||||
enable: sudo -H systemctl enable uwsgi@${SEARXNG_UWSGI_APP%.*}
|
||||
start: sudo -H systemctl start uwsgi@${SEARXNG_UWSGI_APP%.*}
|
||||
restart: sudo -H systemctl restart uwsgi@${SEARXNG_UWSGI_APP%.*}
|
||||
stop: sudo -H systemctl stop uwsgi@${SEARXNG_UWSGI_APP%.*}
|
||||
disable: sudo -H systemctl disable uwsgi@${SEARXNG_UWSGI_APP%.*}
|
||||
|
||||
EOF
|
||||
;;
|
||||
|
|
@ -1054,20 +1054,20 @@ EOF
|
|||
# The unit file starts uWSGI in emperor mode (/etc/uwsgi.ini), see
|
||||
# - https://uwsgi-docs.readthedocs.io/en/latest/Emperor.html
|
||||
|
||||
create: ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
|
||||
restart: sudo -H touch ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
|
||||
disable: sudo -H rm ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
|
||||
create: ${uWSGI_APPS_ENABLED}/${SEARXNG_UWSGI_APP}
|
||||
restart: sudo -H touch ${uWSGI_APPS_ENABLED}/${SEARXNG_UWSGI_APP}
|
||||
disable: sudo -H rm ${uWSGI_APPS_ENABLED}/${SEARXNG_UWSGI_APP}
|
||||
|
||||
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}/${SEARX_UWSGI_APP}")\"" | prefix_stdout " "
|
||||
echo -e "\n.. END searx uwsgi-appini $DIST_NAME"
|
||||
eval "echo \"$(< "${TEMPLATES}/${uWSGI_APPS_AVAILABLE}/${SEARXNG_UWSGI_APP}")\"" | prefix_stdout " "
|
||||
echo -e "\n.. END searxng uwsgi-appini $DIST_NAME"
|
||||
|
||||
)
|
||||
done
|
||||
|
|
@ -5,10 +5,10 @@ LoadModule proxy_module ${APACHE_MODULES}/mod_proxy.so
|
|||
LoadModule proxy_uwsgi_module ${APACHE_MODULES}/mod_proxy_uwsgi.so
|
||||
# LoadModule setenvif_module ${APACHE_MODULES}/mod_setenvif.so
|
||||
|
||||
# SetEnvIf Request_URI "${SEARX_URL_PATH}" dontlog
|
||||
# SetEnvIf Request_URI "${SEARXNG_URL_PATH}" dontlog
|
||||
# CustomLog /dev/null combined env=dontlog
|
||||
|
||||
<Location ${SEARX_URL_PATH}>
|
||||
<Location ${SEARXNG_URL_PATH}>
|
||||
|
||||
<IfModule mod_security2.c>
|
||||
SecRuleEngine Off
|
||||
|
|
@ -22,6 +22,6 @@ LoadModule proxy_uwsgi_module ${APACHE_MODULES}/mod_proxy_uwsgi.so
|
|||
Allow from all
|
||||
|
||||
ProxyPreserveHost On
|
||||
ProxyPass unix:${SEARX_UWSGI_SOCKET}|uwsgi://uwsgi-uds-searx/
|
||||
ProxyPass unix:${SEARXNG_UWSGI_SOCKET}|uwsgi://uwsgi-uds-searxng/
|
||||
|
||||
</Location>
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
# https://example.org/searx
|
||||
# https://example.org/searxng
|
||||
|
||||
location ${SEARX_URL_PATH} {
|
||||
location ${SEARXNG_URL_PATH} {
|
||||
proxy_pass http://127.0.0.1:4004/;
|
||||
|
||||
proxy_set_header Host \$host;
|
||||
|
|
@ -8,9 +8,9 @@ location ${SEARX_URL_PATH} {
|
|||
proxy_set_header X-Real-IP \$remote_addr;
|
||||
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Scheme \$scheme;
|
||||
proxy_set_header X-Script-Name ${SEARX_URL_PATH};
|
||||
proxy_set_header X-Script-Name ${SEARXNG_URL_PATH};
|
||||
}
|
||||
|
||||
location ${SEARX_URL_PATH}/static/ {
|
||||
alias ${SEARX_SRC}/searx/static/;
|
||||
location ${SEARXNG_URL_PATH}/static/ {
|
||||
alias ${SEARXNG_SRC}/searxng/static/;
|
||||
}
|
||||
|
|
@ -25,7 +25,7 @@ search:
|
|||
|
||||
server:
|
||||
secret_key: "ultrasecretkey" # change this!
|
||||
# Proxying image results through searx
|
||||
# Proxying image results through searxng
|
||||
image_proxy: false
|
||||
|
||||
# result_proxy:
|
||||
|
|
@ -15,10 +15,10 @@ env = LANGUAGE=C.UTF-8
|
|||
env = LC_ALL=C.UTF-8
|
||||
|
||||
# chdir to specified directory before apps loading
|
||||
chdir = ${SEARX_SRC}/searx
|
||||
chdir = ${SEARXNG_SRC}/searxng
|
||||
|
||||
# searx configuration (settings.yml)
|
||||
env = SEARX_SETTINGS_PATH=${SEARX_SETTINGS_PATH}
|
||||
# searxng configuration (settings.yml)
|
||||
env = SEARXNG_SETTINGS_PATH=${SEARXNG_SETTINGS_PATH}
|
||||
|
||||
# disable logging for privacy
|
||||
logger = systemd
|
||||
|
|
@ -53,13 +53,13 @@ enable-threads = true
|
|||
# https://uwsgi-docs.readthedocs.io/en/latest/Options.html#plugin-python
|
||||
|
||||
# load a WSGI module
|
||||
module = searx.webapp
|
||||
module = searxng.webapp
|
||||
|
||||
# set PYTHONHOME/virtualenv
|
||||
virtualenv = ${SEARX_PYENV}
|
||||
virtualenv = ${SEARXNG_PYENV}
|
||||
|
||||
# add directory (or glob) to pythonpath
|
||||
pythonpath = ${SEARX_SRC}
|
||||
pythonpath = ${SEARXNG_SRC}
|
||||
|
||||
|
||||
# speak to upstream
|
||||
|
|
@ -73,16 +73,16 @@ pythonpath = ${SEARX_SRC}
|
|||
# https://uwsgi-docs.readthedocs.io/en/latest/Options.html#plugin-http
|
||||
# Native HTTP support: https://uwsgi-docs.readthedocs.io/en/latest/HTTP.html
|
||||
|
||||
http = ${SEARX_INTERNAL_HTTP}
|
||||
http = ${SEARXNG_INTERNAL_HTTP}
|
||||
|
||||
# using unix-sockets:
|
||||
#
|
||||
# On some distributions you need to create the app folder for the sockets::
|
||||
#
|
||||
# mkdir -p /run/uwsgi/app/searx
|
||||
# chown -R ${SERVICE_USER}:${SERVICE_GROUP} /run/uwsgi/app/searx
|
||||
# mkdir -p /run/uwsgi/app/searxng
|
||||
# chown -R ${SERVICE_USER}:${SERVICE_GROUP} /run/uwsgi/app/searxng
|
||||
#
|
||||
# socket = /run/uwsgi/app/searx/socket
|
||||
# socket = /run/uwsgi/app/searxng/socket
|
||||
|
||||
# Cache
|
||||
cache2 = name=searxcache,items=2000,blocks=2000,blocksize=4096,bitmap=1
|
||||
cache2 = name=searxngcache,items=2000,blocks=2000,blocksize=4096,bitmap=1
|
||||
|
|
@ -15,10 +15,10 @@ env = LANGUAGE=C.UTF-8
|
|||
env = LC_ALL=C.UTF-8
|
||||
|
||||
# chdir to specified directory before apps loading
|
||||
chdir = ${SEARX_SRC}/searx
|
||||
chdir = ${SEARXNG_SRC}/searxng
|
||||
|
||||
# searx configuration (settings.yml)
|
||||
env = SEARX_SETTINGS_PATH=${SEARX_SETTINGS_PATH}
|
||||
# searxng configuration (settings.yml)
|
||||
env = SEARXNG_SETTINGS_PATH=${SEARXNG_SETTINGS_PATH}
|
||||
|
||||
# disable logging for privacy
|
||||
logger = systemd
|
||||
|
|
@ -53,13 +53,13 @@ enable-threads = true
|
|||
# https://uwsgi-docs.readthedocs.io/en/latest/Options.html#plugin-python
|
||||
|
||||
# load a WSGI module
|
||||
module = searx.webapp
|
||||
module = searxng.webapp
|
||||
|
||||
# set PYTHONHOME/virtualenv
|
||||
virtualenv = ${SEARX_PYENV}
|
||||
virtualenv = ${SEARXNG_PYENV}
|
||||
|
||||
# add directory (or glob) to pythonpath
|
||||
pythonpath = ${SEARX_SRC}
|
||||
pythonpath = ${SEARXNG_SRC}
|
||||
|
||||
|
||||
# speak to upstream
|
||||
|
|
@ -73,13 +73,13 @@ pythonpath = ${SEARX_SRC}
|
|||
# https://uwsgi-docs.readthedocs.io/en/latest/Options.html#plugin-http
|
||||
# Native HTTP support: https://uwsgi-docs.readthedocs.io/en/latest/HTTP.html
|
||||
|
||||
# http = ${SEARX_INTERNAL_HTTP}
|
||||
# http = ${SEARXNG_INTERNAL_HTTP}
|
||||
|
||||
# using unix-sockets:
|
||||
#
|
||||
# On some distributions you need to create the app folder for the sockets::
|
||||
#
|
||||
# mkdir -p /run/uwsgi/app/searx
|
||||
# chown -R ${SERVICE_USER}:${SERVICE_GROUP} /run/uwsgi/app/searx
|
||||
# mkdir -p /run/uwsgi/app/searxng
|
||||
# chown -R ${SERVICE_USER}:${SERVICE_GROUP} /run/uwsgi/app/searxng
|
||||
#
|
||||
socket = /run/uwsgi/app/searx/socket
|
||||
socket = /run/uwsgi/app/searxng/socket
|
||||
|
|
@ -15,10 +15,10 @@ env = LANGUAGE=C.UTF-8
|
|||
env = LC_ALL=C.UTF-8
|
||||
|
||||
# chdir to specified directory before apps loading
|
||||
chdir = ${SEARX_SRC}/searx
|
||||
chdir = ${SEARXNG_SRC}/searxng
|
||||
|
||||
# searx configuration (settings.yml)
|
||||
env = SEARX_SETTINGS_PATH=${SEARX_SETTINGS_PATH}
|
||||
# searxng configuration (settings.yml)
|
||||
env = SEARXNG_SETTINGS_PATH=${SEARXNG_SETTINGS_PATH}
|
||||
|
||||
# disable logging for privacy
|
||||
disable-logging = true
|
||||
|
|
@ -52,13 +52,13 @@ enable-threads = true
|
|||
# https://uwsgi-docs.readthedocs.io/en/latest/Options.html#plugin-python
|
||||
|
||||
# load a WSGI module
|
||||
module = searx.webapp
|
||||
module = searxng.webapp
|
||||
|
||||
# set PYTHONHOME/virtualenv
|
||||
virtualenv = ${SEARX_PYENV}
|
||||
virtualenv = ${SEARXNG_PYENV}
|
||||
|
||||
# add directory (or glob) to pythonpath
|
||||
pythonpath = ${SEARX_SRC}
|
||||
pythonpath = ${SEARXNG_SRC}
|
||||
|
||||
|
||||
# speak to upstream
|
||||
|
|
@ -72,16 +72,16 @@ pythonpath = ${SEARX_SRC}
|
|||
# https://uwsgi-docs.readthedocs.io/en/latest/Options.html#plugin-http
|
||||
# Native HTTP support: https://uwsgi-docs.readthedocs.io/en/latest/HTTP.html
|
||||
|
||||
http = ${SEARX_INTERNAL_HTTP}
|
||||
http = ${SEARXNG_INTERNAL_HTTP}
|
||||
|
||||
# using unix-sockets:
|
||||
#
|
||||
# On some distributions you need to create the app folder for the sockets::
|
||||
#
|
||||
# mkdir -p /run/uwsgi/app/searx
|
||||
# chown -R ${SERVICE_USER}:${SERVICE_GROUP} /run/uwsgi/app/searx
|
||||
# mkdir -p /run/uwsgi/app/searxng
|
||||
# chown -R ${SERVICE_USER}:${SERVICE_GROUP} /run/uwsgi/app/searxng
|
||||
#
|
||||
# socket = /run/uwsgi/app/searx/socket
|
||||
# socket = /run/uwsgi/app/searxng/socket
|
||||
|
||||
# Cache
|
||||
cache2 = name=searxcache,items=2000,blocks=2000,blocksize=4096,bitmap=1
|
||||
cache2 = name=searxngcache,items=2000,blocks=2000,blocksize=4096,bitmap=1
|
||||
|
|
@ -15,10 +15,10 @@ env = LANGUAGE=C.UTF-8
|
|||
env = LC_ALL=C.UTF-8
|
||||
|
||||
# chdir to specified directory before apps loading
|
||||
chdir = ${SEARX_SRC}/searx
|
||||
chdir = ${SEARXNG_SRC}/searxng
|
||||
|
||||
# searx configuration (settings.yml)
|
||||
env = SEARX_SETTINGS_PATH=${SEARX_SETTINGS_PATH}
|
||||
# searxng configuration (settings.yml)
|
||||
env = SEARXNG_SETTINGS_PATH=${SEARXNG_SETTINGS_PATH}
|
||||
|
||||
# disable logging for privacy
|
||||
disable-logging = true
|
||||
|
|
@ -52,13 +52,13 @@ enable-threads = true
|
|||
# https://uwsgi-docs.readthedocs.io/en/latest/Options.html#plugin-python
|
||||
|
||||
# load a WSGI module
|
||||
module = searx.webapp
|
||||
module = searxng.webapp
|
||||
|
||||
# set PYTHONHOME/virtualenv
|
||||
virtualenv = ${SEARX_PYENV}
|
||||
virtualenv = ${SEARXNG_PYENV}
|
||||
|
||||
# add directory (or glob) to pythonpath
|
||||
pythonpath = ${SEARX_SRC}
|
||||
pythonpath = ${SEARXNG_SRC}
|
||||
|
||||
|
||||
# speak to upstream
|
||||
|
|
@ -72,13 +72,13 @@ pythonpath = ${SEARX_SRC}
|
|||
# https://uwsgi-docs.readthedocs.io/en/latest/Options.html#plugin-http
|
||||
# Native HTTP support: https://uwsgi-docs.readthedocs.io/en/latest/HTTP.html
|
||||
|
||||
# http = ${SEARX_INTERNAL_HTTP}
|
||||
# http = ${SEARXNG_INTERNAL_HTTP}
|
||||
|
||||
# using unix-sockets:
|
||||
#
|
||||
# On some distributions you need to create the app folder for the sockets::
|
||||
#
|
||||
# mkdir -p /run/uwsgi/app/searx
|
||||
# chown -R ${SERVICE_USER}:${SERVICE_GROUP} /run/uwsgi/app/searx
|
||||
# mkdir -p /run/uwsgi/app/searxng
|
||||
# chown -R ${SERVICE_USER}:${SERVICE_GROUP} /run/uwsgi/app/searxng
|
||||
#
|
||||
socket = /run/uwsgi/app/searx/socket
|
||||
socket = /run/uwsgi/app/searxng/socket
|
||||
Loading…
Add table
Add a link
Reference in a new issue