mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
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>
This commit is contained in:
parent
58d5da8b57
commit
99ff16c465
7 changed files with 106 additions and 66 deletions
|
|
@ -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}"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue