From c81849cb5a22d937c0f1de1d02d1fb8e3a7849cd Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Sun, 5 Apr 2020 17:40:37 +0200 Subject: filtron.sh & morty.sh: improve usage message (if used in containers) BTW: normalize soma variable names Signed-off-by: Markus Heiser --- utils/morty.sh | 47 +++++++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 22 deletions(-) (limited to 'utils/morty.sh') diff --git a/utils/morty.sh b/utils/morty.sh index d79faa037..17039a05e 100755 --- a/utils/morty.sh +++ b/utils/morty.sh @@ -83,39 +83,37 @@ apache : ${PUBLIC_URL_MORTY} :install: apache site with a reverse proxy (ProxyPass) :remove: apache site ${APACHE_MORTY_SITE} -If needed, set the environment variable MORTY_LISTEN in the -${DOT_CONFIG#"$REPO_ROOT/"} file:: - - MORTY_LISTEN : ${MORTY_LISTEN} - SERVICE_USER : ${SERVICE_USER} - +If needed, set the environment variables in the '${DOT_CONFIG#"$REPO_ROOT/"}' file:: + PUBLIC_URL_MORTY: ${PUBLIC_URL_MORTY} + 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}" + # 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#*|}]:3000/" + else + # IPv4: + echo " container URL (IPv4): http://${ip#*|}:3000/" + fi + done fi + echo info_searx + [[ -n ${1} ]] && err_msg "$1" } info_searx() { # shellcheck disable=SC1117 cat <