From c1bee0d96f60515bfb716e434da0cf3b2626b496 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Thu, 18 Nov 2021 22:40:42 +0100 Subject: [PATCH 1/3] [mod] filtron.sh - install github.com/searxng/filtron SearXNG maintains a fork of filtron at [1] [1] https://github.com/searxng/filtron Related: https://github.com/searxng/searxng/issues/507#issuecomment-970254027 Signed-off-by: Markus Heiser --- utils/filtron.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/filtron.sh b/utils/filtron.sh index ff380a327..8ad32a319 100755 --- a/utils/filtron.sh +++ b/utils/filtron.sh @@ -348,13 +348,13 @@ filtron_is_installed() { install_filtron() { rst_title "Install filtron in user's ~/go-apps" section echo - go.install github.com/asciimoo/filtron@latest "${SERVICE_USER}" + go.install github.com/searxng/filtron@latest "${SERVICE_USER}" } update_filtron() { rst_title "Update filtron" section echo - go.install github.com/asciimoo/filtron@latest "${SERVICE_USER}" + go.install github.com/searxng/filtron@latest "${SERVICE_USER}" } install_rules() { From ac5cce69cc9ae0d5a6c202a29261fd292dbfe892 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Thu, 18 Nov 2021 23:05:24 +0100 Subject: [PATCH 2/3] [doc] filtron.sh - install github.com/searxng/filtron Signed-off-by: Markus Heiser --- docs/admin/filtron.rst | 4 ++-- docs/build-templates/filtron.rst | 2 +- docs/utils/filtron.sh.rst | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/admin/filtron.rst b/docs/admin/filtron.rst index 1c32c1b37..9587d76cb 100644 --- a/docs/admin/filtron.rst +++ b/docs/admin/filtron.rst @@ -16,7 +16,7 @@ How to protect an instance :local: :backlinks: entry -.. _filtron: https://github.com/asciimoo/filtron +.. _filtron: https://github.com/searxng/filtron SearXNG depends on external search services. To avoid the abuse of these services it is advised to limit the number of requests processed by SearXNG. @@ -30,7 +30,7 @@ filtron & go ============ .. _Go: https://golang.org/ -.. _filtron README: https://github.com/asciimoo/filtron/blob/master/README.md +.. _filtron README: https://github.com/searxng/filtron/blob/master/README.md Filtron needs Go_ installed. If Go_ is preinstalled, filtron_ is simply installed by ``go get`` package management (see `filtron README`_). If you use diff --git a/docs/build-templates/filtron.rst b/docs/build-templates/filtron.rst index 6a39d1f58..a858f7ddd 100644 --- a/docs/build-templates/filtron.rst +++ b/docs/build-templates/filtron.rst @@ -48,6 +48,6 @@ .. code-block:: bash $ sudo -i -u \"${SERVICE_USER}\" - (${SERVICE_USER}) $ go get -v -u github.com/asciimoo/filtron + (${SERVICE_USER}) $ go get -v -u github.com/searxng/filtron .. END install filtron diff --git a/docs/utils/filtron.sh.rst b/docs/utils/filtron.sh.rst index f4a85282a..1f7302392 100644 --- a/docs/utils/filtron.sh.rst +++ b/docs/utils/filtron.sh.rst @@ -13,8 +13,8 @@ `) .. _Go: https://golang.org/ -.. _filtron: https://github.com/asciimoo/filtron -.. _filtron README: https://github.com/asciimoo/filtron/blob/master/README.md +.. _filtron: https://github.com/searxng/filtron +.. _filtron README: https://github.com/searxng/filtron/blob/master/README.md To simplify installation and maintenance of a filtron instance you can use the script :origin:`utils/filtron.sh`. In most cases you will install filtron_ @@ -30,7 +30,7 @@ into this user account: #. Create a separated user account (``filtron``). #. Download and install Go_ binary in user's $HOME (``~filtron``). #. Install filtron with the package management from Go_ (``go get -v -u - github.com/asciimoo/filtron``) + github.com/searxng/filtron``) #. Setup a proper rule configuration :origin:`[ref] ` (``/etc/filtron/rules.json``). #. Setup a systemd service unit :origin:`[ref] From 93e933278af4ce929a0bbcb35e1fdacdd6b899c1 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Sun, 21 Nov 2021 15:41:26 +0100 Subject: [PATCH 3/3] [fix] filtron.sh & morty.sh: quote "$GO_ENV" Signed-off-by: Markus Heiser --- utils/filtron.sh | 3 ++- utils/morty.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/utils/filtron.sh b/utils/filtron.sh index 8ad32a319..2536214e4 100755 --- a/utils/filtron.sh +++ b/utils/filtron.sh @@ -337,7 +337,8 @@ EOF echo "export SERVICE_HOME=$SERVICE_HOME" tee_stderr <> ~/.profile +touch "$GO_ENV" +grep -qFs -- 'source "$GO_ENV"' ~/.profile || echo 'source "$GO_ENV"' >> ~/.profile EOF } diff --git a/utils/morty.sh b/utils/morty.sh index c1f2bc968..25263a3d4 100755 --- a/utils/morty.sh +++ b/utils/morty.sh @@ -337,7 +337,8 @@ EOF echo "export SERVICE_HOME=$SERVICE_HOME" tee_stderr <> ~/.profile +touch $GO_ENV +grep -qFs -- 'source "$GO_ENV"' ~/.profile || echo 'source "$GO_ENV"' >> ~/.profile EOF }