1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-05 04:40:11 +01:00

Merge pull request #266 from return42/fix-scripts

[fix] utils/searx.sh install settings - do not eval the template
This commit is contained in:
Markus Heiser 2021-08-22 16:07:37 +00:00 committed by GitHub
commit 183c856396
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 2 deletions

View File

@ -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}"

View File

@ -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

View File

@ -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