[mod] utils/searx.sh - add command 'inspect settings'

Inspect YAML setting <key> from SearXNG instance (${SEARX_SRC})::

  utils/searx.sh inspect settings server.base_url

utils/lib_install.sh
  should not log on stdout which is used for the output of function
  prompt_installation_setting().  Turned build_msg (stdout) into
  info_msg (stderr).

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
Markus Heiser 2021-07-12 16:51:36 +02:00
parent 28c874bf3f
commit 57b8f340a6
2 changed files with 61 additions and 12 deletions

View file

@ -55,18 +55,18 @@ source_dot_config() {
SEARX_PYENV=$("${REPO_ROOT}/utils/searx.sh" --getenv SEARX_PYENV)
SEARX_SETTINGS_PATH=$("${REPO_ROOT}/utils/searx.sh" --getenv SEARX_SETTINGS_PATH)
if [ ! -r "${SEARX_SRC}" ]; then
build_msg INSTANCE "not yet cloned: ${SEARX_SRC}"
info_msg "not yet cloned: ${SEARX_SRC}"
orig_source_dot_config
return 0
fi
build_msg INSTANCE "using instance at: ${SEARX_SRC}"
info_msg "using instance at: ${SEARX_SRC}"
# set and log DOT_CONFIG
if [ -r "${SEARX_SRC}/.config.sh" ]; then
build_msg INSTANCE "switching to ${SEARX_SRC}/.config.sh"
info_msg "switching to ${SEARX_SRC}/.config.sh"
DOT_CONFIG="${SEARX_SRC}/.config.sh"
else
build_msg INSTANCE "using local config: ${DOT_CONFIG}"
info_msg "using local config: ${DOT_CONFIG}"
fi
init_SEARX_SRC_INIT_FILES
fi
@ -104,12 +104,12 @@ init_SEARX_SRC_INIT_FILES(){
# diff "${REPO_ROOT}/${fname}" "${SEARX_SRC}/${fname}"
if ! cmp --silent "${REPO_ROOT}/${fname}" "${SEARX_SRC}/${fname}"; then
SEARX_SRC_INIT_FILES+=("${fname}")
build_msg INSTANCE "local clone (workingtree), modified file: ./$fname"
info_msg "local clone (workingtree), modified file: ./$fname"
msg="to update use: sudo -H ./utils/searx.sh install init-src"
fi
fi
done <<< "$(git diff --name-only)"
[ -n "$msg" ] && build_msg INSTANCE "$msg"
[ -n "$msg" ] && info_msg "$msg"
}
install_log_searx_instance() {