SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.
Python bingbravedegoogleduckduckgogooglemetasearchprivacypythonqwantsearchsearch-enginesearxsearxngstartpageyahoo
LXC: from searx.sh, morty.sh and filtron.sh tests
Markus Heisere7f69b63f116
diff --git a/utils/filtron.sh b/utils/filtron.shindex 537cea145..85000c592 100755--- a/utils/filtron.sh+++ b/utils/filtron.sh@@ -7,6 +7,7 @@source "$(dirname "${BASH_SOURCE[0]}")/lib.sh"source_dot_configsource "${REPO_ROOT}/utils/lxc-searx.env"+in_container && lxc_set_suite_env# ----------------------------------------------------------------------------# config@@ -329,16 +330,25 @@ EOFfiif ! service_is_available "${PUBLIC_URL}"; then- err_msg "Public service at ${PUBLIC_URL} is not available!"- wait_key+ warn_msg "Public service at ${PUBLIC_URL} is not available!"+ if ! in_container; then+ warn_msg "Check if public name is correct and routed or use the public IP from above."+ fifi+ if in_container; then+ lxc_suite_info+ else+ info_msg "public URL --> ${PUBLIC_URL}"+ info_msg "internal URL --> http://${FILTRON_LISTEN}"+ fi++local _debug_onif ask_yn "Enable filtron debug mode?"; thenenable_debug_debug_on=1fi-echosystemctl --no-pager -l status "${SERVICE_NAME}"echo@@ -346,7 +356,7 @@ EOFinfo_msg "public URL --> ${PUBLIC_URL}"# shellcheck disable=SC2059printf "// use ${_BCyan}CTRL-C${_creset} to stop monitoring the log"- read -r -s -n1 -t 2+ read -r -s -n1 -t 5echowhile true; dotrap break 2diff --git a/utils/lxc.sh b/utils/lxc.shindex b5ae59a7b..bcee16743 100755--- a/utils/lxc.sh+++ b/utils/lxc.sh@@ -108,15 +108,29 @@ cmdinstall:suite: install LXC suite, includes morty & filtron-Images of the LXC suite:-$(echo " ${LOCAL_IMAGES[*]}" | $FMT)+EOF+ usage_images+ echo+ usage_containers+ echo+ [ -n "${1+x}" ] && err_msg "$1"+}-Containers of the LXC suite:+usage_containers() {+ cat <<EOF+LXC suite containers:$(echo " ${CONTAINERS[*]}" | $FMT)EOF[ -n "${1+x}" ] && err_msg "$1"}+usage_images() {+ cat <<EOF+LXC suite images:+$(echo " ${LOCAL_IMAGES[*]}" | $FMT)+EOF+}+lxd_info() {cat <<EOF@@ -164,11 +178,12 @@ main() {images) lxc_delete_images_localy ;;subordinate) echo; del_subordinate_ids ;;${LXC_HOST_PREFIX}-*)+ ! lxc_exists "$2" && usage_containers "unknown container: $2" && exit 42if ask_yn "Do you really want to delete conatiner $2"; thenlxc_delete_container "$2"fi;;- *) usage "unknown (or mising) container <name> $2"; exit 42;;+ *) usage "uknown or missing container <name> $2"; exit 42;;esac;;add)@@ -183,10 +198,11 @@ main() {case $2 in''|containers) lxc_cmd "$1" ;;${LXC_HOST_PREFIX}-*)+ ! lxc_exists "$2" && usage_containers "unknown container: $2" && exit 42info_msg "lxc $1 $2"lxc "$1" "$2" | prefix_stdout "[${_BBlue}${i}${_creset}] ";;- *) usage "ukknown or missing container <name> $2"; exit 42;;+ *) usage "uknown or missing container <name> $2"; exit 42;;esac;;show)@@ -225,13 +241,12 @@ main() {done;;${LXC_HOST_PREFIX}-*)+ ! lxc_exists "$1" && usage_containers "unknown container: $1" && exit 42local name=$1shiftlxc_exec_cmd "${name}" "$@";;-- *) usage "unknown <name>: $1"; exit 42- ;;+ *) usage "uknown or missing container <name> $2"; exit 42;;esac;;install)@@ -351,6 +366,7 @@ show_suite(){elselxc exec -t "${i}" -- "${LXC_REPO_ROOT}/utils/lxc.sh" __show suite \| prefix_stdout "[${_BBlue}${i}${_creset}] "+ echofidone}@@ -384,12 +400,12 @@ lxc_exec_cmd() {shiftexit_val=info_msg "[${_BBlue}${name}${_creset}] ${_BGreen}${*}${_creset}"- lxc exec "${name}" -- "$@"+ lxc exec --cwd "${LXC_REPO_ROOT}" "${name}" -- "$@"exit_val=$?if [[ $exit_val -ne 0 ]]; then- warn_msg "[${_BBlue}${i}${_creset}] exit code (${_BRed}${exit_val}${_creset}) from ${_BGreen}${*}${_creset}"+ warn_msg "[${_BBlue}${name}${_creset}] exit code (${_BRed}${exit_val}${_creset}) from ${_BGreen}${*}${_creset}"else- info_msg "[${_BBlue}${i}${_creset}] exit code (${exit_val}) from ${_BGreen}${*}${_creset}"+ info_msg "[${_BBlue}${name}${_creset}] exit code (${exit_val}) from ${_BGreen}${*}${_creset}"fiecho}diff --git a/utils/morty.sh b/utils/morty.shindex 175bdf019..58de0cc99 100755--- a/utils/morty.sh+++ b/utils/morty.sh@@ -6,6 +6,7 @@source "$(dirname "${BASH_SOURCE[0]}")/lib.sh"source_dot_configsource "${REPO_ROOT}/utils/lxc-searx.env"+in_container && lxc_set_suite_env# ----------------------------------------------------------------------------# config@@ -83,7 +84,14 @@ ${DOT_CONFIG#"$REPO_ROOT/"} file::MORTY_LISTEN : ${MORTY_LISTEN}SERVICE_USER : ${SERVICE_USER}+EOF+ if in_container; then+ lxc_suite_info+ else+ info_msg "public URL --> ${PUBLIC_URL}"+ info_msg "internal URL --> http://${SEARX_INTERNAL_URL}"+ fiinfo_searx[[ -n ${1} ]] && err_msg "$1"}@@ -333,21 +341,32 @@ EOFwait_keyfi+ if ! service_is_available "${PUBLIC_URL}"; then+ warn_msg "Public service at ${PUBLIC_URL} is not available!"+ if ! in_container; then+ warn_msg "Check if public name is correct and routed or use the public IP from above."+ fi+ fi++ if in_container; then+ lxc_suite_info+ else+ info_msg "public URL --> ${PUBLIC_URL_MORTY}"+ info_msg "morty URL --> http://${MORTY_LISTEN}"+ fi+local _debug_on- if ask_yn "Enable filtron debug mode?"; then+ if ask_yn "Enable filtron debug mode (needs reinstall of systemd service)?"; thenenable_debug_debug_on=1+ else+ systemctl --no-pager -l status "${SERVICE_NAME}"fi-- echo- systemctl --no-pager -l status "${SERVICE_NAME}"echo- info_msg "morty URL --> http://${MORTY_LISTEN}"- info_msg "public URL --> ${PUBLIC_URL_MORTY}"# shellcheck disable=SC2059printf "// use ${_BCyan}CTRL-C${_creset} to stop monitoring the log"- read -r -s -n1 -t 2+ read -r -s -n1 -t 5echowhile true; dotrap break 2diff --git a/utils/searx.sh b/utils/searx.shindex 205c7068d..14af32d0f 100755--- a/utils/searx.sh+++ b/utils/searx.sh@@ -7,6 +7,7 @@source "$(dirname "${BASH_SOURCE[0]}")/lib.sh"source_dot_configsource "${REPO_ROOT}/utils/lxc-searx.env"+in_container && lxc_set_suite_env# ----------------------------------------------------------------------------# config@@ -223,6 +224,11 @@ 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+ ;;+ esacassert_userwait_keyclone_searx@@ -545,26 +551,21 @@ EOF|| err_msg "uWSGI app $SEARX_UWSGI_APP not available!"if in_container; then- warn_msg "runnning inside container ..."- for ip in $(global_IPs); do- if [[ $ip =~ .*:.* ]]; then- info_msg " public HTTP service (IPv6) --> http://${ip#*|}"- else- info_msg " public HTTP service (IPv4) --> http://${ip#*|}"- fi- done- warn_msg "SEARX_INTERNAL_URL not available from outside"+ lxc_suite_info+ else+ info_msg "public URL --> ${PUBLIC_URL}"+ info_msg "internal URL --> http://${SEARX_INTERNAL_URL}"fiif ! service_is_available "http://${SEARX_INTERNAL_URL}"; thenerr_msg "uWSGI app (service) at http://${SEARX_INTERNAL_URL} is not available!"- echo -e "${_Green}stop with [${_BCyan}CTRL-C${_Green}] or .."- wait_key+ MSG="${_Green}[${_BCyan}CTRL-C${_Green}] to stop or [${_BCyan}KEY${_Green}] to continue"\+ wait_keyfiif ! service_is_available "${PUBLIC_URL}"; thenwarn_msg "Public service at ${PUBLIC_URL} is not available!"- if in_container; then+ if ! in_container; thenwarn_msg "Check if public name is correct and routed or use the public IP from above."fifi@@ -575,19 +576,31 @@ EOF_debug_on=1fiecho- systemctl --no-pager -l status "${SERVICE_NAME}"- echo- info_msg "public URL --> ${PUBLIC_URL}"- info_msg "internal URL --> http://${SEARX_INTERNAL_URL}"+ case $DIST_ID-$DIST_VERS in+ ubuntu-*|debian-*)+ systemctl --no-pager -l status "${SERVICE_NAME}"+ ;;+ arch-*)+ systemctl --no-pager -l status "uwsgi@${SERVICE_NAME%.*}"+ ;;+ fedora-*)+ systemctl --no-pager -l status uwsgi+ ;;+ esac+# shellcheck disable=SC2059printf "// use ${_BCyan}CTRL-C${_creset} to stop monitoring the log"- read -r -s -n1 -t 2+ read -r -s -n1 -t 5echo+while true; dotrap break 2- #journalctl -f -u "${SERVICE_NAME}"- tail -f /var/log/uwsgi/app/searx.log+ case $DIST_ID-$DIST_VERS in+ ubuntu-*|debian-*) tail -f /var/log/uwsgi/app/searx.log ;;+ arch-*) journalctl -f -u "uwsgi@${SERVICE_NAME%.*}" ;;+ fedora-*) journalctl -f -u uwsgi ;;+ esacdoneif [[ $_debug_on == 1 ]]; then