summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarIT.de>2021-10-30 16:12:57 +0000
committerGitHub <noreply@github.com>2021-10-30 16:12:57 +0000
commit8f18c69f7ab387de18679b46c3d29365310b44d4 (patch)
treec2fcc45ca5a7ff37b52f94eecedcff0968355c86 /utils
parent46fde2e98e0fd55e947c3d9c1663f22e3d34bf1e (diff)
parentdb6a4d13e7ebe08a5df4fe6f99b0ef87aac94cc8 (diff)
downloadsearxng-8f18c69f7ab387de18679b46c3d29365310b44d4.tar.gz
searxng-8f18c69f7ab387de18679b46c3d29365310b44d4.zip
Merge pull request #446 from return42/searxng-brand
[brand] SearXNG environment variables & /utils scripts
Diffstat (limited to 'utils')
-rw-r--r--utils/brand.env2
-rw-r--r--utils/build_env.py2
-rwxr-xr-xutils/filtron.sh32
-rwxr-xr-xutils/lib_install.sh14
-rwxr-xr-xutils/morty.sh16
-rwxr-xr-xutils/searx.sh166
-rw-r--r--utils/templates/etc/httpd/sites-available/searxng.conf:filtron (renamed from utils/templates/etc/httpd/sites-available/searx.conf:filtron)0
-rw-r--r--utils/templates/etc/httpd/sites-available/searxng.conf:uwsgi (renamed from utils/templates/etc/httpd/sites-available/searx.conf:uwsgi)4
-rw-r--r--utils/templates/etc/nginx/default.apps-available/searxng.conf:filtron (renamed from utils/templates/etc/nginx/default.apps-available/searx.conf:filtron)6
-rw-r--r--utils/templates/etc/uwsgi/apps-archlinux/searxng.ini (renamed from utils/templates/etc/uwsgi/apps-archlinux/searx.ini)0
-rw-r--r--utils/templates/etc/uwsgi/apps-archlinux/searxng.ini:socket (renamed from utils/templates/etc/uwsgi/apps-archlinux/searx.ini:socket)0
-rw-r--r--utils/templates/etc/uwsgi/apps-available/searxng.ini (renamed from utils/templates/etc/uwsgi/apps-available/searx.ini)0
-rw-r--r--utils/templates/etc/uwsgi/apps-available/searxng.ini:socket (renamed from utils/templates/etc/uwsgi/apps-available/searx.ini:socket)0
13 files changed, 152 insertions, 90 deletions
diff --git a/utils/brand.env b/utils/brand.env
index 5cc2af35b..31afce53c 100644
--- a/utils/brand.env
+++ b/utils/brand.env
@@ -1,4 +1,4 @@
-export SEARX_URL=''
+export SEARXNG_URL=''
export SEARXNG_PORT='8888'
export SEARXNG_BIND_ADDRESS='127.0.0.1'
export GIT_URL='https://github.com/searxng/searxng'
diff --git a/utils/build_env.py b/utils/build_env.py
index cd2fc2d04..709da6815 100644
--- a/utils/build_env.py
+++ b/utils/build_env.py
@@ -28,7 +28,7 @@ def _env(*arg, **kwargs):
name_val = [
- ('SEARX_URL' , 'server.base_url'),
+ ('SEARXNG_URL' , 'server.base_url'),
('SEARXNG_PORT' , 'server.port'),
('SEARXNG_BIND_ADDRESS' , 'server.bind_address'),
diff --git a/utils/filtron.sh b/utils/filtron.sh
index eb34b2413..fa661ab8b 100755
--- a/utils/filtron.sh
+++ b/utils/filtron.sh
@@ -46,8 +46,8 @@ 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="searx.conf"
-NGINX_FILTRON_SITE="searx.conf"
+APACHE_FILTRON_SITE="searxng.conf"
+NGINX_FILTRON_SITE="searxng.conf"
# shellcheck disable=SC2034
CONFIG_FILES=(
@@ -64,6 +64,7 @@ usage() {
usage::
$(basename "$0") shell
$(basename "$0") install [all|user|rules]
+ $(basename "$0") reinstall all
$(basename "$0") update [filtron]
$(basename "$0") remove [all]
$(basename "$0") activate [service]
@@ -77,9 +78,12 @@ shell
start interactive shell from user ${SERVICE_USER}
install / remove
:all: complete setup of filtron service
- :check: check the filtron installation
:user: add/remove service user '$SERVICE_USER' ($SERVICE_HOME)
:rules: reinstall filtron rules $FILTRON_RULES
+install
+ :check: check the filtron installation
+reinstall:
+ :all: runs 'install/remove all'
update filtron
Update filtron installation ($SERVICE_HOME)
activate service
@@ -133,6 +137,16 @@ main() {
;;
*) usage "$_usage"; exit 42;;
esac ;;
+ reinstall)
+ rst_title "re-install $SERVICE_NAME" part
+ sudo_or_exit
+ case $2 in
+ all)
+ remove_all
+ install_all
+ ;;
+ *) usage "$_usage"; exit 42;;
+ esac ;;
install)
rst_title "$SERVICE_NAME" part
sudo_or_exit
@@ -271,9 +285,19 @@ install_check() {
if [[ "${GO_VERSION}" > "$(go_version)" ]]; then
warn_msg "golang ($(go_version)) needs to be $GO_VERSION at least"
+ warn_msg "you need to reinstall $SERVICE_USER --> $0 reinstall all"
else
info_msg "golang $(go_version) is installed (min needed is: $GO_VERSION)"
fi
+
+ if [ -f "${APACHE_SITES_AVAILABLE}/searx.conf" ]; then
+ warn_msg "old searx.conf apache site exists"
+ fi
+
+ if [ -f "${NGINX_APPS_AVAILABLE}/searx.conf" ]; then
+ warn_msg "old searx.conf nginx site exists"
+ fi
+
}
go_version(){
@@ -560,7 +584,7 @@ This installs a reverse proxy (ProxyPass) into nginx site (${NGINX_FILTRON_SITE}
# shellcheck disable=SC2034
SEARX_SRC=$("${REPO_ROOT}/utils/searx.sh" --getenv SEARX_SRC)
# shellcheck disable=SC2034
- SEARX_URL_PATH=$("${REPO_ROOT}/utils/searx.sh" --getenv SEARX_URL_PATH)
+ SEARXNG_URL_PATH=$("${REPO_ROOT}/utils/searx.sh" --getenv SEARXNG_URL_PATH)
nginx_install_app --variant=filtron "${NGINX_FILTRON_SITE}"
info_msg "testing public url .."
diff --git a/utils/lib_install.sh b/utils/lib_install.sh
index 4fd63b830..4a251c096 100755
--- a/utils/lib_install.sh
+++ b/utils/lib_install.sh
@@ -116,9 +116,9 @@ install_log_searx_instance() {
echo -e "---- SearXNG instance setup ${_BBlue}(status: $(install_searx_get_state))${_creset}"
echo -e " SEARXNG_SETTINGS_PATH : ${_BBlue}${SEARXNG_SETTINGS_PATH}${_creset}"
- echo -e " SSEARX_PYENV : ${_BBlue}${SEARX_PYENV}${_creset}"
+ echo -e " SEARX_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_URL : ${_BBlue}${SEARXNG_URL:-none}${_creset}"
if in_container; then
# searx is listening on 127.0.0.1 and not available from outside container
@@ -184,17 +184,17 @@ 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/searx"). 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
diff --git a/utils/morty.sh b/utils/morty.sh
index 60220df02..e1481016f 100755
--- a/utils/morty.sh
+++ b/utils/morty.sh
@@ -49,6 +49,7 @@ usage() {
usage::
$(basename "$0") shell
$(basename "$0") install [all|check|user]
+ $(basename "$0") reinstall all
$(basename "$0") update [morty]
$(basename "$0") remove [all]
$(basename "$0") activate [service]
@@ -66,6 +67,8 @@ install / remove
:user: add/remove service user '$SERVICE_USER' ($SERVICE_HOME)
install
:check: check the morty installation
+reinstall:
+ :all: runs 'install/remove all'
update morty
Update morty installation ($SERVICE_HOME)
activate service
@@ -145,6 +148,16 @@ main() {
;;
*) usage "$_usage"; exit 42;;
esac ;;
+ reinstall)
+ rst_title "re-install $SERVICE_NAME" part
+ sudo_or_exit
+ case $2 in
+ all)
+ remove_all
+ install_all
+ ;;
+ *) usage "$_usage"; exit 42;;
+ esac ;;
install)
rst_title "$SERVICE_NAME" part
sudo_or_exit
@@ -286,6 +299,7 @@ install_check() {
if [[ "${GO_VERSION}" > "$(go_version)" ]]; then
warn_msg "golang ($(go_version)) needs to be $GO_VERSION at least"
+ warn_msg "you need to reinstall $SERVICE_USER --> $0 reinstall all"
else
info_msg "golang $(go_version) is installed (min needed is: $GO_VERSION)"
fi
@@ -513,7 +527,7 @@ This installs a reverse proxy (ProxyPass) into nginx site (${NGINX_MORTY_SITE})"
# shellcheck disable=SC2034
SEARX_SRC=$("${REPO_ROOT}/utils/searx.sh" --getenv SEARX_SRC)
# shellcheck disable=SC2034
- SEARX_URL_PATH=$("${REPO_ROOT}/utils/searx.sh" --getenv SEARX_URL_PATH)
+ SEARXNG_URL_PATH=$("${REPO_ROOT}/utils/searx.sh" --getenv SEARXNG_URL_PATH)
nginx_install_app "${NGINX_MORTY_SITE}"
info_msg "testing public url .."
diff --git a/utils/searx.sh b/utils/searx.sh
index e3393835c..79cd2f26d 100755
--- a/utils/searx.sh
+++ b/utils/searx.sh
@@ -14,9 +14,9 @@ source "${REPO_ROOT}/utils/lib_install.sh"
SEARX_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_USER="${SERVICE_USER:-${SERVICE_NAME}}"
@@ -29,7 +29,7 @@ GIT_BRANCH="${GIT_BRANCH:-master}"
SEARX_PYENV="${SERVICE_HOME}/searx-pyenv"
SEARX_SRC="${SERVICE_HOME}/searx-src"
SEARXNG_SETTINGS_PATH="/etc/searxng/settings.yml"
-SEARX_UWSGI_APP="searx.ini"
+SEARXNG_UWSGI_APP="searxng.ini"
# shellcheck disable=SC2034
SEARX_UWSGI_SOCKET="/run/uwsgi/app/searx/socket"
@@ -125,7 +125,7 @@ APACHE_SEARX_SITE="searx.conf"
# shellcheck disable=SC2034
CONFIG_FILES=(
- "${uWSGI_APPS_AVAILABLE}/${SEARX_UWSGI_APP}"
+ "${uWSGI_APPS_AVAILABLE}/${SEARXNG_UWSGI_APP}"
)
# shellcheck disable=SC2034
@@ -141,7 +141,8 @@ 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") install [all|check|init-src|dot-config|user|searx-src|pyenv|uwsgi|packages|settings|buildhost]
+ $(basename "$0") reinstall all
$(basename "$0") update [searx]
$(basename "$0") remove [all|user|pyenv|searx-src]
$(basename "$0") activate [service]
@@ -154,7 +155,6 @@ shell
start interactive shell from user ${SERVICE_USER}
install / remove
:all: complete (de-) installation of searx service
- :check: check the SearXNG installation
:user: add/remove service user '$SERVICE_USER' ($SERVICE_HOME)
:dot-config: copy ./config.sh to ${SEARX_SRC}
:searx-src: clone $GIT_URL
@@ -164,6 +164,10 @@ install / remove
: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
+install
+ :check: check the SearXNG installation
+reinstall:
+ :all: runs 'install/remove all'
update searx
Update SearXNG installation ($SERVICE_HOME)
activate service
@@ -213,18 +217,28 @@ main() {
;;
*) usage "$_usage"; exit 42;;
esac ;;
- install)
+ reinstall)
+ rst_title "re-install $SERVICE_NAME" part
sudo_or_exit
case $2 in
- check)
- rst_title "SearXNG (check installation)" part
- verify_continue_install
- sudo -H -u "${SERVICE_USER}" "${SEARX_PYENV}/bin/python" "utils/searxng_check.py"
+ all)
+ remove_all
+ install_all
;;
+ *) usage "$_usage"; exit 42;;
+ esac ;;
+ install)
+ sudo_or_exit
+ case $2 in
all)
rst_title "SearXNG (install)" part
install_all
;;
+ check)
+ rst_title "SearXNG (check installation)" part
+ verify_continue_install
+ install_check
+ ;;
user)
rst_title "SearXNG (install user)"
verify_continue_install
@@ -352,6 +366,42 @@ install_all() {
fi
}
+install_check() {
+ if service_account_is_available "$SERVICE_USER"; then
+ info_msg "Service account $SERVICE_USER exists."
+ else
+ err_msg "Service account $SERVICE_USER does not exists!"
+ fi
+
+ if pyenv_is_available; then
+ info_msg "~$SERVICE_USER: python environment is available."
+ else
+ err_msg "~$SERVICE_USER: python environment is not available!"
+ fi
+
+ if clone_is_available; then
+ info_msg "~$SERVICE_USER: SearXNG software is installed."
+ else
+ err_msg "~$SERVICE_USER: Missing SearXNG software!"
+ fi
+
+ if uWSGI_app_enabled "$SEARXNG_UWSGI_APP"; then
+ info_msg "uWSGI app $SEARXNG_UWSGI_APP is enabled."
+ else
+ err_msg "uWSGI app $SEARXNG_UWSGI_APP not enabled!"
+ fi
+
+ uWSGI_app_available "$SEARXNG_UWSGI_APP" \
+ || err_msg "uWSGI app $SEARXNG_UWSGI_APP not available!"
+
+ sudo -H -u "${SERVICE_USER}" "${SEARX_PYENV}/bin/python" "utils/searxng_check.py"
+
+ if uWSGI_app_available 'searx.ini'; then
+ warn_msg "old searx.ini uWSGI app exists"
+ warn_msg "you need to reinstall $SERVICE_USER --> $0 reinstall all"
+ fi
+}
+
update_searx() {
rst_title "Update SearXNG instance"
@@ -367,7 +417,7 @@ pip install -U pyyaml
pip install -U -e .
EOF
install_settings
- uWSGI_restart "$SEARX_UWSGI_APP"
+ uWSGI_restart "$SEARXNG_UWSGI_APP"
}
remove_all() {
@@ -729,30 +779,30 @@ EOF
}
install_searx_uwsgi() {
- rst_title "Install SearXNG's uWSGI app (searx.ini)" section
+ 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
+ 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() {
@@ -761,7 +811,7 @@ enable_image_proxy() {
cd ${SEARX_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() {
@@ -770,7 +820,7 @@ disable_image_proxy() {
cd ${SEARX_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() {
@@ -780,7 +830,7 @@ enable_debug() {
cd ${SEARX_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() {
@@ -789,7 +839,7 @@ disable_debug() {
cd ${SEARX_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() {
@@ -851,33 +901,7 @@ sourced ${DOT_CONFIG} :
EOF
install_log_searx_instance
- if service_account_is_available "$SERVICE_USER"; then
- info_msg "Service account $SERVICE_USER exists."
- else
- err_msg "Service account $SERVICE_USER does not exists!"
- fi
-
- if pyenv_is_available; then
- info_msg "~$SERVICE_USER: python environment is available."
- else
- err_msg "~$SERVICE_USER: python environment is not available!"
- fi
-
- if clone_is_available; then
- info_msg "~$SERVICE_USER: SearXNG software is installed."
- else
- 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."
- else
- err_msg "uWSGI app $SEARX_UWSGI_APP not enabled!"
- fi
-
- uWSGI_app_available "$SEARX_UWSGI_APP" \
- || err_msg "uWSGI app $SEARX_UWSGI_APP not available!"
-
+ install_check
if in_container; then
lxc_suite_info
else
@@ -955,9 +979,9 @@ excessively bot queries."
apache_install_site --variant=uwsgi "${APACHE_SEARX_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!"
@@ -979,9 +1003,9 @@ This removes apache site ${APACHE_SEARX_SITE}."
apache_remove_site "${APACHE_SEARX_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() {
@@ -1025,12 +1049,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
;;
@@ -1043,12 +1067,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
;;
@@ -1060,9 +1084,9 @@ 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
;;
@@ -1072,7 +1096,7 @@ EOF
echo -e "\n.. START searx uwsgi-appini $DIST_NAME"
echo ".. code:: bash"
echo
- eval "echo \"$(< "${TEMPLATES}/${uWSGI_APPS_AVAILABLE}/${SEARX_UWSGI_APP}")\"" | prefix_stdout " "
+ eval "echo \"$(< "${TEMPLATES}/${uWSGI_APPS_AVAILABLE}/${SEARXNG_UWSGI_APP}")\"" | prefix_stdout " "
echo -e "\n.. END searx uwsgi-appini $DIST_NAME"
)
diff --git a/utils/templates/etc/httpd/sites-available/searx.conf:filtron b/utils/templates/etc/httpd/sites-available/searxng.conf:filtron
index 379d47e24..379d47e24 100644
--- a/utils/templates/etc/httpd/sites-available/searx.conf:filtron
+++ b/utils/templates/etc/httpd/sites-available/searxng.conf:filtron
diff --git a/utils/templates/etc/httpd/sites-available/searx.conf:uwsgi b/utils/templates/etc/httpd/sites-available/searxng.conf:uwsgi
index ef702de3a..aabc125ae 100644
--- a/utils/templates/etc/httpd/sites-available/searx.conf:uwsgi
+++ b/utils/templates/etc/httpd/sites-available/searxng.conf:uwsgi
@@ -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
diff --git a/utils/templates/etc/nginx/default.apps-available/searx.conf:filtron b/utils/templates/etc/nginx/default.apps-available/searxng.conf:filtron
index a89aa38b3..e25461c47 100644
--- a/utils/templates/etc/nginx/default.apps-available/searx.conf:filtron
+++ b/utils/templates/etc/nginx/default.apps-available/searxng.conf:filtron
@@ -1,6 +1,6 @@
# https://example.org/searx
-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/ {
+location ${SEARXNG_URL_PATH}/static/ {
alias ${SEARX_SRC}/searx/static/;
}
diff --git a/utils/templates/etc/uwsgi/apps-archlinux/searx.ini b/utils/templates/etc/uwsgi/apps-archlinux/searxng.ini
index dcb7d1a7d..dcb7d1a7d 100644
--- a/utils/templates/etc/uwsgi/apps-archlinux/searx.ini
+++ b/utils/templates/etc/uwsgi/apps-archlinux/searxng.ini
diff --git a/utils/templates/etc/uwsgi/apps-archlinux/searx.ini:socket b/utils/templates/etc/uwsgi/apps-archlinux/searxng.ini:socket
index 580600072..580600072 100644
--- a/utils/templates/etc/uwsgi/apps-archlinux/searx.ini:socket
+++ b/utils/templates/etc/uwsgi/apps-archlinux/searxng.ini:socket
diff --git a/utils/templates/etc/uwsgi/apps-available/searx.ini b/utils/templates/etc/uwsgi/apps-available/searxng.ini
index 440c2e97d..440c2e97d 100644
--- a/utils/templates/etc/uwsgi/apps-available/searx.ini
+++ b/utils/templates/etc/uwsgi/apps-available/searxng.ini
diff --git a/utils/templates/etc/uwsgi/apps-available/searx.ini:socket b/utils/templates/etc/uwsgi/apps-available/searxng.ini:socket
index 08c98cf61..08c98cf61 100644
--- a/utils/templates/etc/uwsgi/apps-available/searx.ini:socket
+++ b/utils/templates/etc/uwsgi/apps-available/searxng.ini:socket