summaryrefslogtreecommitdiff
path: root/utils/searx.sh
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2020-04-13 11:34:28 +0200
committerMarkus Heiser <markus.heiser@darmarit.de>2020-04-13 11:34:28 +0200
commit99ff16c465ed4d3b98041bf308dfeb0918b535ab (patch)
tree0fe9838cd97b985d37eb9f12f29a9a9383d6d2cd /utils/searx.sh
parent58d5da8b57c5aeab92f551e8d175be67537c351c (diff)
downloadsearxng-99ff16c465ed4d3b98041bf308dfeb0918b535ab.tar.gz
searxng-99ff16c465ed4d3b98041bf308dfeb0918b535ab.zip
tooling box: added nginx + polished bash scripts and environment
- add installation method for nginx sites, morty and filtron - clean up PUBLIC_URL environment in and outside of containers - clean up comand lines - handle uWSGI quirks on fedora (emperor mode) - handle Python quirks on debian (there is no 'python' command anymore) - lib.sh: add die and die_caller functions - lxc_suite_install_info is now a function - lint: shellcheck Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'utils/searx.sh')
-rwxr-xr-xutils/searx.sh23
1 files changed, 16 insertions, 7 deletions
diff --git a/utils/searx.sh b/utils/searx.sh
index 9a73c58cc..48521f606 100755
--- a/utils/searx.sh
+++ b/utils/searx.sh
@@ -81,6 +81,11 @@ case $DIST_ID-$DIST_VERS in
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"
+ BUILD_PACKAGES="${BUILD_PACKAGES_debian}"
+ ;;
ubuntu-*|debian-*)
SEARX_PACKAGES="${SEARX_PACKAGES_debian}"
BUILD_PACKAGES="${BUILD_PACKAGES_debian}"
@@ -206,7 +211,12 @@ main() {
pyenv) create_pyenv ;;
searx-src) clone_searx ;;
settings) install_settings ;;
- uwsgi) install_searx_uwsgi;;
+ uwsgi)
+ install_searx_uwsgi
+ if ! service_is_available "http://${SEARX_INTERNAL_HTTP}"; then
+ err_msg "URL http://${SEARX_INTERNAL_HTTP} not available, check searx & uwsgi setup!"
+ fi
+ ;;
packages)
pkg_install "$SEARX_PACKAGES"
;;
@@ -272,11 +282,6 @@ install_all() {
rst_title "Install $SEARX_INSTANCE_NAME (service)"
pkg_install "$SEARX_PACKAGES"
wait_key
- case $DIST_ID-$DIST_VERS in
- fedora-*)
- systemctl enable uwsgi
- ;;
- esac
assert_user
wait_key
clone_searx
@@ -514,6 +519,7 @@ EOF
install_searx_uwsgi() {
rst_title "Install searx's uWSGI app (searx.ini)" section
echo
+ install_uwsgi
uWSGI_install_app "$SEARX_UWSGI_APP"
}
@@ -575,7 +581,10 @@ EOF
}
set_result_proxy() {
- info_msg "try to set result proxy ..."
+
+ # usage: set_result_proxy <URL> [<key>]
+
+ info_msg "try to set result proxy: $1"
cp "${SEARX_SETTINGS_PATH}" "${SEARX_SETTINGS_PATH}.bak"
_set_result_proxy "$1" "$2" > "${SEARX_SETTINGS_PATH}"
}