summaryrefslogtreecommitdiff
path: root/utils/morty.sh
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2020-03-29 15:09:34 +0200
committerMarkus Heiser <markus.heiser@darmarit.de>2020-03-29 15:09:34 +0200
commit7b4cf2eb489d8f6c95ccac5af180254b78e7c460 (patch)
treed3b8f4fbd5f5bcc7b78be06aecacf739ffa9b1e4 /utils/morty.sh
parent65b22be1f4e6bb4f293f3d8cef0c4c7635528090 (diff)
downloadsearxng-7b4cf2eb489d8f6c95ccac5af180254b78e7c460.tar.gz
searxng-7b4cf2eb489d8f6c95ccac5af180254b78e7c460.zip
tooling box: simplify build enviroments
- no more need for a .config.mk - docs: use searx.brands environment - searx.sh, filtron.sh & morty.sh are sourcing utils/brand.env Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'utils/morty.sh')
-rwxr-xr-xutils/morty.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/utils/morty.sh b/utils/morty.sh
index 58de0cc99..a20cde36c 100755
--- a/utils/morty.sh
+++ b/utils/morty.sh
@@ -4,6 +4,8 @@
# shellcheck source=utils/lib.sh
source "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
+# shellcheck source=utils/brand.env
+source "${REPO_ROOT}/utils/brand.env"
source_dot_config
source "${REPO_ROOT}/utils/lxc-searx.env"
in_container && lxc_set_suite_env
@@ -12,8 +14,9 @@ in_container && lxc_set_suite_env
# config
# ----------------------------------------------------------------------------
-PUBLIC_URL_PATH_MORTY="/morty"
-PUBLIC_URL_MORTY="$(dirname "${PUBLIC_URL}")${PUBLIC_URL_PATH_MORTY}"
+PUBLIC_URL="${PUBLIC_URL:-http://$(uname -n)/searx}"
+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}"
# shellcheck disable=SC2034