summaryrefslogtreecommitdiff
path: root/utils/filtron.sh
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2020-04-05 17:40:37 +0200
committerMarkus Heiser <markus.heiser@darmarit.de>2020-04-05 17:40:37 +0200
commitc81849cb5a22d937c0f1de1d02d1fb8e3a7849cd (patch)
treefa6cd5f48c7ea6b0c7fc6164f6dbb220af59c39f /utils/filtron.sh
parentc2caf9569c5b6e1a9d143382c2045983f7c6dd61 (diff)
downloadsearxng-c81849cb5a22d937c0f1de1d02d1fb8e3a7849cd.tar.gz
searxng-c81849cb5a22d937c0f1de1d02d1fb8e3a7849cd.zip
filtron.sh & morty.sh: improve usage message (if used in containers)
BTW: normalize soma variable names Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'utils/filtron.sh')
-rwxr-xr-xutils/filtron.sh15
1 files changed, 12 insertions, 3 deletions
diff --git a/utils/filtron.sh b/utils/filtron.sh
index d2be60737..6c58b07a2 100755
--- a/utils/filtron.sh
+++ b/utils/filtron.sh
@@ -97,15 +97,24 @@ apache (${PUBLIC_URL})
filtron rules: ${FILTRON_RULES}
If needed, set PUBLIC_URL of your WEB service in the '${DOT_CONFIG#"$REPO_ROOT/"}' file::
-
PUBLIC_URL : ${PUBLIC_URL}
PUBLIC_HOST : ${PUBLIC_HOST}
SERVICE_USER : ${SERVICE_USER}
+ FILTRON_TARGET : ${FILTRON_TARGET}
FILTRON_API : ${FILTRON_API}
FILTRON_LISTEN : ${FILTRON_LISTEN}
- FILTRON_TARGET : ${FILTRON_TARGET}
-
EOF
+ if in_container; then
+ # in containers the service is listening on 0.0.0.0 (see lxc-searx.env)
+ for ip in $(global_IPs) ; do
+ if [[ $ip =~ .*:.* ]]; then
+ echo " container URL (IPv6): http://[${ip#*|}]:4005/"
+ else
+ # IPv4:
+ echo " container URL (IPv4): http://${ip#*|}:4005/"
+ fi
+ done
+ fi
[[ -n ${1} ]] && err_msg "$1"
}