on master help sign in
[fix] markup of auto generated installation instruction (uWSGI part)
18805eeMarkus Heiser
docs/admin/installation-uwsgi.rst+6−5
@@ -108,6 +108,7 @@ restart the uwsgi application.
108 :start-after: START searx uwsgi-description ubuntu-20.04
108 :start-after: START searx uwsgi-description ubuntu-20.04
109 :end-before: END searx uwsgi-description ubuntu-20.04
109 :end-before: END searx uwsgi-description ubuntu-20.04
110
110
111+ .. hotfix: a bug group-tab need this comment
111
112
112 .. group-tab:: Arch Linux
113 .. group-tab:: Arch Linux
113
114
@@ -115,6 +116,7 @@ restart the uwsgi application.
115 :start-after: START searx uwsgi-description arch
116 :start-after: START searx uwsgi-description arch
116 :end-before: END searx uwsgi-description arch
117 :end-before: END searx uwsgi-description arch
117
118
119+ .. hotfix: a bug group-tab need this comment
118
120
119 .. group-tab:: Fedora / RHEL
121 .. group-tab:: Fedora / RHEL
120
122
@@ -128,22 +130,21 @@ restart the uwsgi application.
128 .. group-tab:: Ubuntu / debian
130 .. group-tab:: Ubuntu / debian
129
131
130 .. kernel-include:: $DOCS_BUILD/includes/searx.rst
132 .. kernel-include:: $DOCS_BUILD/includes/searx.rst
131− :code: ini
132 :start-after: START searx uwsgi-appini ubuntu-20.04
133 :start-after: START searx uwsgi-appini ubuntu-20.04
133 :end-before: END searx uwsgi-appini ubuntu-20.04
134 :end-before: END searx uwsgi-appini ubuntu-20.04
134
135
136+ .. hotfix: a bug group-tab need this comment
137+
135 .. group-tab:: Arch Linux
138 .. group-tab:: Arch Linux
136
139
137 .. kernel-include:: $DOCS_BUILD/includes/searx.rst
140 .. kernel-include:: $DOCS_BUILD/includes/searx.rst
138− :code: ini
139 :start-after: START searx uwsgi-appini arch
141 :start-after: START searx uwsgi-appini arch
140 :end-before: END searx uwsgi-appini arch
142 :end-before: END searx uwsgi-appini arch
141
143
144+ .. hotfix: a bug group-tab need this comment
145+
142 .. group-tab:: Fedora / RHEL
146 .. group-tab:: Fedora / RHEL
143
147
144 .. kernel-include:: $DOCS_BUILD/includes/searx.rst
148 .. kernel-include:: $DOCS_BUILD/includes/searx.rst
145− :code: ini
146 :start-after: START searx uwsgi-appini fedora
149 :start-after: START searx uwsgi-appini fedora
147 :end-before: END searx uwsgi-appini fedora
150 :end-before: END searx uwsgi-appini fedora
148−
149−
utils/searx.sh+42−28
@@ -816,47 +816,61 @@ rst-doc() {
816
816
817 case $DIST_ID-$DIST_VERS in
817 case $DIST_ID-$DIST_VERS in
818 ubuntu-*|debian-*) cat <<EOF
818 ubuntu-*|debian-*) cat <<EOF
819+
820+.. code:: bash
821+
819−# init.d --> /usr/share/doc/uwsgi/README.Debian.gz
822+ # init.d --> /usr/share/doc/uwsgi/README.Debian.gz
820−# For uWSGI debian uses the LSB init process, this might be changed
823+ # 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
824+ # one day, see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=833067
822−
825+
823−create ${uWSGI_APPS_AVAILABLE}/${SEARX_UWSGI_APP}
826+ create ${uWSGI_APPS_AVAILABLE}/${SEARX_UWSGI_APP}
824−enable: sudo -H ln -s ${uWSGI_APPS_AVAILABLE}/${SEARX_UWSGI_APP} ${uWSGI_APPS_ENABLED}/
827+ enable: sudo -H ln -s ${uWSGI_APPS_AVAILABLE}/${SEARX_UWSGI_APP} ${uWSGI_APPS_ENABLED}/
825−start: sudo -H service uwsgi start ${SEARX_UWSGI_APP%.*}
828+ start: sudo -H service uwsgi start ${SEARX_UWSGI_APP%.*}
826−restart: sudo -H service uwsgi restart ${SEARX_UWSGI_APP%.*}
829+ restart: sudo -H service uwsgi restart ${SEARX_UWSGI_APP%.*}
827−stop: sudo -H service uwsgi stop ${SEARX_UWSGI_APP%.*}
830+ stop: sudo -H service uwsgi stop ${SEARX_UWSGI_APP%.*}
828−disable: sudo -H rm ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
831+ disable: sudo -H rm ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
832+
829EOF
833EOF
830 ;;
834 ;;
831 arch-*) cat <<EOF
835 arch-*) cat <<EOF
836+
837+.. code:: bash
838+
832−# systemd --> /usr/lib/systemd/system/uwsgi@.service
839+ # systemd --> /usr/lib/systemd/system/uwsgi@.service
833−# For uWSGI archlinux uses systemd template units, see
840+ # For uWSGI archlinux uses systemd template units, see
834−# - http://0pointer.de/blog/projects/instances.html
841+ # - http://0pointer.de/blog/projects/instances.html
835−# - https://uwsgi-docs.readthedocs.io/en/latest/Systemd.html#one-service-per-app-in-systemd
842+ # - https://uwsgi-docs.readthedocs.io/en/latest/Systemd.html#one-service-per-app-in-systemd
836−
843+
837−create: ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
844+ create: ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
838−enable: sudo -H systemctl enable uwsgi@${SEARX_UWSGI_APP%.*}
845+ enable: sudo -H systemctl enable uwsgi@${SEARX_UWSGI_APP%.*}
839−start: sudo -H systemctl start uwsgi@${SEARX_UWSGI_APP%.*}
846+ start: sudo -H systemctl start uwsgi@${SEARX_UWSGI_APP%.*}
840−restart: sudo -H systemctl restart uwsgi@${SEARX_UWSGI_APP%.*}
847+ restart: sudo -H systemctl restart uwsgi@${SEARX_UWSGI_APP%.*}
841−stop: sudo -H systemctl stop uwsgi@${SEARX_UWSGI_APP%.*}
848+ stop: sudo -H systemctl stop uwsgi@${SEARX_UWSGI_APP%.*}
842−disable: sudo -H systemctl disable uwsgi@${SEARX_UWSGI_APP%.*}
849+ disable: sudo -H systemctl disable uwsgi@${SEARX_UWSGI_APP%.*}
850+
843EOF
851EOF
844 ;;
852 ;;
845 fedora-*) cat <<EOF
853 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
849
854
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+
850−create: ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
861+ create: ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
851−restart: sudo -H touch ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
862+ restart: sudo -H touch ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
852−disable: sudo -H rm ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
863+ disable: sudo -H rm ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
864+
853EOF
865EOF
854 ;;
866 ;;
855 esac
867 esac
856 echo -e ".. END searx uwsgi-description $DIST_NAME"
868 echo -e ".. END searx uwsgi-description $DIST_NAME"
857
869
858 echo -e "\n.. START searx uwsgi-appini $DIST_NAME"
870 echo -e "\n.. START searx uwsgi-appini $DIST_NAME"
871+ echo ".. code:: bash"
872+ echo
859− eval "echo \"$(< "${TEMPLATES}/${uWSGI_APPS_AVAILABLE}/${SEARX_UWSGI_APP}")\""
873+ eval "echo \"$(< "${TEMPLATES}/${uWSGI_APPS_AVAILABLE}/${SEARX_UWSGI_APP}")\"" | prefix_stdout " "
860 echo -e "\n.. END searx uwsgi-appini $DIST_NAME"
874 echo -e "\n.. END searx uwsgi-appini $DIST_NAME"
861
875
862 )
876 )