From 8ba4dc26d1a4588043b4c0020f72b6b01c35126a Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Fri, 20 Aug 2021 14:21:54 +0200 Subject: [PATCH] [fix] utils/searx.sh install settings - do not eval the template The settings template in utils/templates/etc/searx/settings.yml does not include any replacements (shell environment variables). BTW: utils/filtron.sh & utils/lib.sh Add some more messages to installation procedures, to be more clear. Signed-off-by: Markus Heiser --- utils/filtron.sh | 6 ++++++ utils/lib.sh | 3 ++- utils/searx.sh | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/utils/filtron.sh b/utils/filtron.sh index 3bd6f016d..4e35199ee 100755 --- a/utils/filtron.sh +++ b/utils/filtron.sh @@ -302,6 +302,12 @@ install_rules() { return fi + if cmp --silent "${FILTRON_RULES}" "${FILTRON_RULES_TEMPLATE}"; then + info_msg "${FILTRON_RULES} is up to date with" + info_msg "${FILTRON_RULES_TEMPLATE}" + return + fi + rst_para "Diff between origin's rules file (+) and current (-):" echo "${FILTRON_RULES}" "${FILTRON_RULES_TEMPLATE}" $DIFF_CMD "${FILTRON_RULES}" "${FILTRON_RULES_TEMPLATE}" diff --git a/utils/lib.sh b/utils/lib.sh index f29666226..028450ab4 100755 --- a/utils/lib.sh +++ b/utils/lib.sh @@ -437,7 +437,8 @@ install_template() { if [[ "$do_eval" == "1" ]]; then template_file="${CACHE}${dst}${variant}" - info_msg "BUILD template ${template_file}" + info_msg "BUILD ${template_file}" + info_msg "BUILD using template ${template_origin}" if [[ -n ${SUDO_USER} ]]; then sudo -u "${SUDO_USER}" mkdir -p "$(dirname "${template_file}")" else diff --git a/utils/searx.sh b/utils/searx.sh index 3ebe5df11..a2d42c27b 100755 --- a/utils/searx.sh +++ b/utils/searx.sh @@ -621,7 +621,7 @@ install_settings() { fi mkdir -p "$(dirname "${SEARX_SETTINGS_PATH}")" - install_template \ + install_template --no-eval \ "${SEARX_SETTINGS_PATH}" \ "${SERVICE_USER}" "${SERVICE_GROUP}" configure_searx