diff options
author | Markus Heiser <markus.heiser@darmarit.de> | 2020-04-08 18:38:36 +0200 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarit.de> | 2020-04-08 18:38:36 +0200 |
commit | f693149cded4f783380f8f02154bd9288b72cdd5 (patch) | |
tree | 3b3809f5c667ab44e53bb200cca3ce959c0380dd /utils/morty.sh | |
parent | ee39a098acb2386abd5382de5c9476cc4ffe2e03 (diff) | |
download | searxng-f693149cded4f783380f8f02154bd9288b72cdd5.tar.gz searxng-f693149cded4f783380f8f02154bd9288b72cdd5.zip |
Changes from the installation tests on (all) LXC containers.
Tested and fixed HTTP & uWSGI installation on:
ubu1604 ubu1804 ubu1910 ubu2004 fedora31 archlinux
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'utils/morty.sh')
-rwxr-xr-x | utils/morty.sh | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/utils/morty.sh b/utils/morty.sh index 4de411999..34d792dbe 100755 --- a/utils/morty.sh +++ b/utils/morty.sh @@ -14,12 +14,16 @@ in_container && lxc_set_suite_env # config # ---------------------------------------------------------------------------- -PUBLIC_URL="${PUBLIC_URL:-http://$(uname -n)/searx}" -PUBLIC_HOST="${PUBLIC_HOST:-$(echo "$PUBLIC_URL" | sed -e 's/[^/]*\/\/\([^@]*@\)\?\([^:/]*\).*/\2/')}" +MORTY_LISTEN="${MORTY_LISTEN:-127.0.0.1:3000}" PUBLIC_URL_PATH_MORTY="${PUBLIC_URL_PATH_MORTY:-/morty}" -PUBLIC_URL_MORTY="$(echo "$PUBLIC_URL" | sed -e's,^\(.*://[^/]*\).*,\1,g')${PUBLIC_URL_PATH_MORTY}" -MORTY_LISTEN="${MORTY_LISTEN:-127.0.0.1:3000}" +SEARX_URL="${PUBLIC_URL:-http://$(uname -n)/searx}" +PUBLIC_URL_MORTY="$(echo "$SEARX_URL" | sed -e's,^\(.*://[^/]*\).*,\1,g')${PUBLIC_URL_PATH_MORTY}" +if in_container; then + # container hostnames do not have a DNS entry, use primary IP + PUBLIC_URL_MORTY="$(url_replace_hostname "$PUBLIC_URL_MORTY" "$(primary_ip)")" +fi + # shellcheck disable=SC2034 MORTY_TIMEOUT=5 @@ -425,7 +429,7 @@ This removes apache site ${APACHE_MORTY_SITE}." ! apache_is_installed && err_msg "Apache is not installed." - if ! ask_yn "Do you really want to continue?"; then + if ! ask_yn "Do you really want to continue?" Yn; then return fi |