filtron.sh.rst 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. .. _filtron.sh:
  2. ====================
  3. ``utils/filtron.sh``
  4. ====================
  5. .. sidebar:: further reading
  6. - :ref:`searx filtron`
  7. - :ref:`architecture`
  8. - :ref:`installation` (:ref:`nginx <installation nginx>` & :ref:`apache
  9. <installation apache>`)
  10. .. _Go: https://golang.org/
  11. .. _filtron: https://github.com/asciimoo/filtron
  12. .. _filtron README: https://github.com/asciimoo/filtron/blob/master/README.md
  13. To simplify installation and maintenance of a filtron instance you can use the
  14. script :origin:`utils/filtron.sh`. In most cases you will install filtron_
  15. simply by running the command:
  16. .. code:: bash
  17. sudo -H ./utils/filtron.sh install all
  18. The script adds a ``${SERVICE_USER}`` (default:``filtron``) and installs filtron_
  19. into this user account:
  20. #. Create a separated user account (``filtron``).
  21. #. Download and install Go_ binary in user's $HOME (``~filtron``).
  22. #. Install filtron with the package management from Go_ (``go get -v -u
  23. github.com/asciimoo/filtron``)
  24. #. Setup a proper rule configuration :origin:`[ref]
  25. <utils/templates/etc/filtron/rules.json>` (``/etc/filtron/rules.json``).
  26. #. Setup a systemd service unit :origin:`[ref]
  27. <utils/templates/lib/systemd/system/filtron.service>`
  28. (``/lib/systemd/system/filtron.service``).
  29. Create user
  30. ===========
  31. .. kernel-include:: $DOCS_BUILD/includes/filtron.rst
  32. :start-after: START create user
  33. :end-before: END create user
  34. Install go
  35. ==========
  36. .. kernel-include:: $DOCS_BUILD/includes/filtron.rst
  37. :start-after: START install go
  38. :end-before: END install go
  39. Install filtron
  40. ===============
  41. Install :origin:`rules.json <utils/templates/etc/filtron/rules.json>` at
  42. ``/etc/filtron/rules.json`` (see :ref:`Sample configuration of filtron`) and
  43. install filtron software and systemd unit:
  44. .. kernel-include:: $DOCS_BUILD/includes/filtron.rst
  45. :start-after: START install filtron
  46. :end-before: END install filtron
  47. .. kernel-include:: $DOCS_BUILD/includes/filtron.rst
  48. :start-after: START install systemd unit
  49. :end-before: END install systemd unit
  50. .. _filtron.sh overview:
  51. Overview
  52. ========
  53. The ``--help`` output of the script is largely self-explanatory
  54. (:ref:`toolboxing common`):
  55. .. program-output:: ../utils/filtron.sh --help