on master help sign in
[fix] markup of auto generated installation instruction (uWSGI part)

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>

commit18805ee35296e6e34be59f37083190990f4afcbb authorMarkus Heiser <markus.heiser@darmarit.de> dateWed 24 Jun 2020, 15:15 (6 years ago) parenta984afd
2 files changed+48−33
docs/admin/installation-uwsgi.rst+6−5 utils/searx.sh+42−28
docs/admin/installation-uwsgi.rst+6−5
@@ -108,6 +108,7 @@ restart the uwsgi application.
108108 :start-after: START searx uwsgi-description ubuntu-20.04
109109 :end-before: END searx uwsgi-description ubuntu-20.04
110110
111+ .. hotfix: a bug group-tab need this comment
111112
112113 .. group-tab:: Arch Linux
113114
@@ -115,6 +116,7 @@ restart the uwsgi application.
115116 :start-after: START searx uwsgi-description arch
116117 :end-before: END searx uwsgi-description arch
117118
119+ .. hotfix: a bug group-tab need this comment
118120
119121 .. group-tab:: Fedora / RHEL
120122
@@ -128,22 +130,21 @@ restart the uwsgi application.
128130 .. group-tab:: Ubuntu / debian
129131
130132 .. kernel-include:: $DOCS_BUILD/includes/searx.rst
131− :code: ini
132133 :start-after: START searx uwsgi-appini ubuntu-20.04
133134 :end-before: END searx uwsgi-appini ubuntu-20.04
134135
136+ .. hotfix: a bug group-tab need this comment
137+
135138 .. group-tab:: Arch Linux
136139
137140 .. kernel-include:: $DOCS_BUILD/includes/searx.rst
138− :code: ini
139141 :start-after: START searx uwsgi-appini arch
140142 :end-before: END searx uwsgi-appini arch
141143
144+ .. hotfix: a bug group-tab need this comment
145+
142146 .. group-tab:: Fedora / RHEL
143147
144148 .. kernel-include:: $DOCS_BUILD/includes/searx.rst
145− :code: ini
146149 :start-after: START searx uwsgi-appini fedora
147150 :end-before: END searx uwsgi-appini fedora
148−
149−
utils/searx.sh+42−28
@@ -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 )