@@ -816,47 +816,61 @@ rst-doc() {
816816
817817 case $DIST_ID-$DIST_VERS in
818818 ubuntu-*|debian-*) cat <<EOF
819−# init.d --> /usr/share/doc/uwsgi/README.Debian.gz
820−# For uWSGI debian uses the LSB init process, this might be changed
821−# one day, see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=833067
822−
823−create ${uWSGI_APPS_AVAILABLE}/${SEARX_UWSGI_APP}
824−enable: sudo -H ln -s ${uWSGI_APPS_AVAILABLE}/${SEARX_UWSGI_APP} ${uWSGI_APPS_ENABLED}/
825−start: sudo -H service uwsgi start ${SEARX_UWSGI_APP%.*}
826−restart: sudo -H service uwsgi restart ${SEARX_UWSGI_APP%.*}
827−stop: sudo -H service uwsgi stop ${SEARX_UWSGI_APP%.*}
828−disable: sudo -H rm ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
819+
820+.. code:: bash
821+
822+ # init.d --> /usr/share/doc/uwsgi/README.Debian.gz
823+ # For uWSGI debian uses the LSB init process, this might be changed
824+ # one day, see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=833067
825+
826+ create ${uWSGI_APPS_AVAILABLE}/${SEARX_UWSGI_APP}
827+ enable: sudo -H ln -s ${uWSGI_APPS_AVAILABLE}/${SEARX_UWSGI_APP} ${uWSGI_APPS_ENABLED}/
828+ start: sudo -H service uwsgi start ${SEARX_UWSGI_APP%.*}
829+ restart: sudo -H service uwsgi restart ${SEARX_UWSGI_APP%.*}
830+ stop: sudo -H service uwsgi stop ${SEARX_UWSGI_APP%.*}
831+ disable: sudo -H rm ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
832+
829833EOF
830834 ;;
831835 arch-*) cat <<EOF
832−# systemd --> /usr/lib/systemd/system/uwsgi@.service
833−# For uWSGI archlinux uses systemd template units, see
834−# - http://0pointer.de/blog/projects/instances.html
835−# - https://uwsgi-docs.readthedocs.io/en/latest/Systemd.html#one-service-per-app-in-systemd
836−
837−create: ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
838−enable: sudo -H systemctl enable uwsgi@${SEARX_UWSGI_APP%.*}
839−start: sudo -H systemctl start uwsgi@${SEARX_UWSGI_APP%.*}
840−restart: sudo -H systemctl restart uwsgi@${SEARX_UWSGI_APP%.*}
841−stop: sudo -H systemctl stop uwsgi@${SEARX_UWSGI_APP%.*}
842−disable: sudo -H systemctl disable uwsgi@${SEARX_UWSGI_APP%.*}
836+
837+.. code:: bash
838+
839+ # systemd --> /usr/lib/systemd/system/uwsgi@.service
840+ # For uWSGI archlinux uses systemd template units, see
841+ # - http://0pointer.de/blog/projects/instances.html
842+ # - https://uwsgi-docs.readthedocs.io/en/latest/Systemd.html#one-service-per-app-in-systemd
843+
844+ create: ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
845+ enable: sudo -H systemctl enable uwsgi@${SEARX_UWSGI_APP%.*}
846+ start: sudo -H systemctl start uwsgi@${SEARX_UWSGI_APP%.*}
847+ restart: sudo -H systemctl restart uwsgi@${SEARX_UWSGI_APP%.*}
848+ stop: sudo -H systemctl stop uwsgi@${SEARX_UWSGI_APP%.*}
849+ disable: sudo -H systemctl disable uwsgi@${SEARX_UWSGI_APP%.*}
850+
843851EOF
844852 ;;
845853 fedora-*) cat <<EOF
846−# systemd --> /usr/lib/systemd/system/uwsgi.service
847−# The unit file starts uWSGI in emperor mode (/etc/uwsgi.ini), see
848−# - https://uwsgi-docs.readthedocs.io/en/latest/Emperor.html
849854
850−create: ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
851−restart: sudo -H touch ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
852−disable: sudo -H rm ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
855+.. code:: bash
856+
857+ # systemd --> /usr/lib/systemd/system/uwsgi.service
858+ # The unit file starts uWSGI in emperor mode (/etc/uwsgi.ini), see
859+ # - https://uwsgi-docs.readthedocs.io/en/latest/Emperor.html
860+
861+ create: ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
862+ restart: sudo -H touch ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
863+ disable: sudo -H rm ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
864+
853865EOF
854866 ;;
855867 esac
856868 echo -e ".. END searx uwsgi-description $DIST_NAME"
857869
858870 echo -e "\n.. START searx uwsgi-appini $DIST_NAME"
859− eval "echo \"$(< "${TEMPLATES}/${uWSGI_APPS_AVAILABLE}/${SEARX_UWSGI_APP}")\""
871+ echo ".. code:: bash"
872+ echo
873+ eval "echo \"$(< "${TEMPLATES}/${uWSGI_APPS_AVAILABLE}/${SEARX_UWSGI_APP}")\"" | prefix_stdout " "
860874 echo -e "\n.. END searx uwsgi-appini $DIST_NAME"
861875
862876 )