summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2020-12-08 20:19:10 +0100
committerMarkus Heiser <markus.heiser@darmarit.de>2020-12-08 20:19:10 +0100
commita70b9b9f616d75507bd404f036b95ce91cefefa4 (patch)
tree2f332b6e1836b0e994c393dd2820a5f9ecc7957e /utils
parentc1a97322687546a066dacffb472d87a86eaadbd4 (diff)
downloadsearxng-a70b9b9f616d75507bd404f036b95ce91cefefa4.tar.gz
searxng-a70b9b9f616d75507bd404f036b95ce91cefefa4.zip
[doc] recommend to use 'use_default_settings=True'
Since #2291 is merged, it is recommend to use:: use_default_settings=True 1. Add a template file use_default_settings.yml:: SEARX_SETTINGS_TEMPLATE="${REPO_ROOT}/utils/templates/etc/searx/use_default_settings.yml" 2. In Chapter "Configuration" recommend to make use of 'use_default_settings=True' and describe it 3. Rewrite of docs/admin/settings.rst - move chapter 'settings.yml location' to the top - update and split chapter 'Global Settings' 4. Add environment SEARX_SETTINGS_TEMPLATE to .config.sh 5. Use environment $SEARX_SETTINGS_TEMPLATE in the utils/searx.sh script Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'utils')
-rwxr-xr-xutils/searx.sh13
-rw-r--r--utils/templates/etc/searx/use_default_settings.yml22
2 files changed, 29 insertions, 6 deletions
diff --git a/utils/searx.sh b/utils/searx.sh
index 386b2861f..06b3c2dfc 100755
--- a/utils/searx.sh
+++ b/utils/searx.sh
@@ -36,6 +36,7 @@ GIT_BRANCH="${GIT_BRANCH:-master}"
SEARX_PYENV="${SERVICE_HOME}/searx-pyenv"
SEARX_SRC="${SERVICE_HOME}/searx-src"
SEARX_SETTINGS_PATH="/etc/searx/settings.yml"
+SEARX_SETTINGS_TEMPLATE="${REPO_ROOT}/utils/templates/etc/searx/use_default_settings.yml"
SEARX_UWSGI_APP="searx.ini"
# shellcheck disable=SC2034
SEARX_UWSGI_SOCKET="/run/uwsgi/app/searx/socket"
@@ -139,7 +140,7 @@ usage() {
cat <<EOF
usage::
$(basename "$0") shell
- $(basename "$0") install [all|user|searx-src|pyenv|uwsgi|packages|buildhost]
+ $(basename "$0") install [all|user|searx-src|pyenv|uwsgi|packages|settings|buildhost]
$(basename "$0") update [searx]
$(basename "$0") remove [all|user|pyenv|searx-src]
$(basename "$0") activate [service]
@@ -413,14 +414,14 @@ install_settings() {
if [[ ! -f ${SEARX_SETTINGS_PATH} ]]; then
info_msg "install settings ${REPO_ROOT}/searx/settings.yml"
info_msg " --> ${SEARX_SETTINGS_PATH}"
- cp "${REPO_ROOT}/searx/settings.yml" "${SEARX_SETTINGS_PATH}"
+ cp "${SEARX_SETTINGS_TEMPLATE}" "${SEARX_SETTINGS_PATH}"
configure_searx
return
fi
rst_para "Diff between origin's setting file (+) and current (-):"
- echo
- $DIFF_CMD "${SEARX_SETTINGS_PATH}" "${SEARX_SRC}/searx/settings.yml"
+ echo "${SEARX_SETTINGS_PATH}" "${SEARX_SETTINGS_TEMPLATE}"
+ $DIFF_CMD "${SEARX_SETTINGS_PATH}" "${SEARX_SETTINGS_TEMPLATE}"
local action
choose_one action "What should happen to the settings file? " \
@@ -434,7 +435,7 @@ install_settings() {
"use origin settings")
backup_file "${SEARX_SETTINGS_PATH}"
info_msg "install origin settings"
- cp "${SEARX_SRC}/searx/settings.yml" "${SEARX_SETTINGS_PATH}"
+ cp "${SEARX_SETTINGS_TEMPLATE}" "${SEARX_SETTINGS_PATH}"
;;
"start interactiv shell")
backup_file "${SEARX_SETTINGS_PATH}"
@@ -442,7 +443,7 @@ install_settings() {
sudo -H -i
rst_para 'Diff between new setting file (-) and current (+):'
echo
- $DIFF_CMD "${SEARX_SRC}/searx/settings.yml" "${SEARX_SETTINGS_PATH}"
+ $DIFF_CMD "${SEARX_SETTINGS_TEMPLATE}" "${SEARX_SETTINGS_PATH}"
wait_key
;;
esac
diff --git a/utils/templates/etc/searx/use_default_settings.yml b/utils/templates/etc/searx/use_default_settings.yml
new file mode 100644
index 000000000..e019a25bb
--- /dev/null
+++ b/utils/templates/etc/searx/use_default_settings.yml
@@ -0,0 +1,22 @@
+use_default_settings: True
+
+general:
+ debug : False # Debug mode, only for development
+ instance_name : "searx" # displayed name
+
+search:
+ safe_search : 0 # Filter results. 0: None, 1: Moderate, 2: Strict
+ autocomplete : "" # Existing autocomplete backends: "dbpedia", "duckduckgo", "google", "startpage", "swisscows", "qwant", "wikipedia" - leave blank to turn it off by default
+ default_lang : "" # Default search language - leave blank to detect from browser information or use codes from 'languages.py'
+
+server:
+ port : 8888
+ bind_address : "127.0.0.1" # address to listen on
+ secret_key : "ultrasecretkey" # change this!
+ base_url : False # Set custom base_url. Possible values: False or "https://your.custom.host/location/"
+ image_proxy : False # Proxying image results through searx
+
+# uncomment below section if you have running morty proxy
+#result_proxy:
+# url : http://127.0.0.1:3000/
+# key : !!binary "your_morty_proxy_key"