summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2020-06-30 15:37:39 +0200
committerMarkus Heiser <markus.heiser@darmarit.de>2020-06-30 15:37:39 +0200
commitf14a7add31c8db54c90ee7bd8504e3f395faf944 (patch)
tree42690fa0e0b77f81f87201635e4d3f73c4330739 /utils
parentca1c3bd15d60faf235894cb4f6f3a15150e3a6c3 (diff)
parentc59ca600423367d54e9b301cf086deeb66602831 (diff)
Merge branch 'master' of https://github.com/asciimoo/searx into csp-oscar-theme
Diffstat (limited to 'utils')
-rw-r--r--utils/fetch_languages.py4
-rwxr-xr-xutils/searx.sh70
2 files changed, 44 insertions, 30 deletions
diff --git a/utils/fetch_languages.py b/utils/fetch_languages.py
index ddebb4111..77ec0bf20 100644
--- a/utils/fetch_languages.py
+++ b/utils/fetch_languages.py
@@ -28,10 +28,10 @@ def fetch_supported_languages():
names.sort()
for engine_name in names:
- print("fetching languages of engine %s" % engine_name)
-
if hasattr(engines[engine_name], 'fetch_supported_languages'):
engines_languages[engine_name] = engines[engine_name].fetch_supported_languages()
+ print("fetched %s languages from engine %s" % (
+ len(engines_languages[engine_name]), engine_name))
if type(engines_languages[engine_name]) == list:
engines_languages[engine_name] = sorted(engines_languages[engine_name])
diff --git a/utils/searx.sh b/utils/searx.sh
index 4009fddb0..886b38f8c 100755
--- a/utils/searx.sh
+++ b/utils/searx.sh
@@ -816,47 +816,61 @@ rst-doc() {
case $DIST_ID-$DIST_VERS in
ubuntu-*|debian-*) cat <<EOF
-# init.d --> /usr/share/doc/uwsgi/README.Debian.gz
-# For uWSGI debian uses the LSB init process, this might be changed
-# one day, see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=833067
-
-create ${uWSGI_APPS_AVAILABLE}/${SEARX_UWSGI_APP}
-enable: sudo -H ln -s ${uWSGI_APPS_AVAILABLE}/${SEARX_UWSGI_APP} ${uWSGI_APPS_ENABLED}/
-start: sudo -H service uwsgi start ${SEARX_UWSGI_APP%.*}
-restart: sudo -H service uwsgi restart ${SEARX_UWSGI_APP%.*}
-stop: sudo -H service uwsgi stop ${SEARX_UWSGI_APP%.*}
-disable: sudo -H rm ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
+
+.. code:: bash
+
+ # init.d --> /usr/share/doc/uwsgi/README.Debian.gz
+ # For uWSGI debian uses the LSB init process, this might be changed
+ # one day, see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=833067
+
+ create ${uWSGI_APPS_AVAILABLE}/${SEARX_UWSGI_APP}
+ enable: sudo -H ln -s ${uWSGI_APPS_AVAILABLE}/${SEARX_UWSGI_APP} ${uWSGI_APPS_ENABLED}/
+ start: sudo -H service uwsgi start ${SEARX_UWSGI_APP%.*}
+ restart: sudo -H service uwsgi restart ${SEARX_UWSGI_APP%.*}
+ stop: sudo -H service uwsgi stop ${SEARX_UWSGI_APP%.*}
+ disable: sudo -H rm ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
+
EOF
;;
arch-*) cat <<EOF
-# systemd --> /usr/lib/systemd/system/uwsgi@.service
-# For uWSGI archlinux uses systemd template units, see
-# - http://0pointer.de/blog/projects/instances.html
-# - https://uwsgi-docs.readthedocs.io/en/latest/Systemd.html#one-service-per-app-in-systemd
-
-create: ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
-enable: sudo -H systemctl enable uwsgi@${SEARX_UWSGI_APP%.*}
-start: sudo -H systemctl start uwsgi@${SEARX_UWSGI_APP%.*}
-restart: sudo -H systemctl restart uwsgi@${SEARX_UWSGI_APP%.*}
-stop: sudo -H systemctl stop uwsgi@${SEARX_UWSGI_APP%.*}
-disable: sudo -H systemctl disable uwsgi@${SEARX_UWSGI_APP%.*}
+
+.. code:: bash
+
+ # systemd --> /usr/lib/systemd/system/uwsgi@.service
+ # For uWSGI archlinux uses systemd template units, see
+ # - http://0pointer.de/blog/projects/instances.html
+ # - https://uwsgi-docs.readthedocs.io/en/latest/Systemd.html#one-service-per-app-in-systemd
+
+ create: ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
+ enable: sudo -H systemctl enable uwsgi@${SEARX_UWSGI_APP%.*}
+ start: sudo -H systemctl start uwsgi@${SEARX_UWSGI_APP%.*}
+ restart: sudo -H systemctl restart uwsgi@${SEARX_UWSGI_APP%.*}
+ stop: sudo -H systemctl stop uwsgi@${SEARX_UWSGI_APP%.*}
+ disable: sudo -H systemctl disable uwsgi@${SEARX_UWSGI_APP%.*}
+
EOF
;;
fedora-*) cat <<EOF
-# systemd --> /usr/lib/systemd/system/uwsgi.service
-# The unit file starts uWSGI in emperor mode (/etc/uwsgi.ini), see
-# - https://uwsgi-docs.readthedocs.io/en/latest/Emperor.html
-create: ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
-restart: sudo -H touch ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
-disable: sudo -H rm ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
+.. code:: bash
+
+ # systemd --> /usr/lib/systemd/system/uwsgi.service
+ # The unit file starts uWSGI in emperor mode (/etc/uwsgi.ini), see
+ # - https://uwsgi-docs.readthedocs.io/en/latest/Emperor.html
+
+ create: ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
+ restart: sudo -H touch ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
+ disable: sudo -H rm ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
+
EOF
;;
esac
echo -e ".. END searx uwsgi-description $DIST_NAME"
echo -e "\n.. START searx uwsgi-appini $DIST_NAME"
- eval "echo \"$(< "${TEMPLATES}/${uWSGI_APPS_AVAILABLE}/${SEARX_UWSGI_APP}")\""
+ echo ".. code:: bash"
+ echo
+ eval "echo \"$(< "${TEMPLATES}/${uWSGI_APPS_AVAILABLE}/${SEARX_UWSGI_APP}")\"" | prefix_stdout " "
echo -e "\n.. END searx uwsgi-appini $DIST_NAME"
)