filtron.rst 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. .. START create user
  2. .. tabs::
  3. .. group-tab:: bash
  4. .. code-block:: sh
  5. $ sudo -H useradd --shell /bin/bash --system \\
  6. --home-dir \"$SERVICE_HOME\" \\
  7. --comment \"Privacy-respecting metasearch engine\" $SERVICE_USER
  8. $ sudo -H mkdir \"$SERVICE_HOME\"
  9. $ sudo -H chown -R \"$SERVICE_GROUP:$SERVICE_GROUP\" \"$SERVICE_HOME\"
  10. .. END create user
  11. .. START install go
  12. .. tabs::
  13. .. group-tab:: bash
  14. .. code-block:: bash
  15. $ cat > \"$GO_ENV\" <<EOF
  16. export GOPATH=${SERVICE_HOME}/go-apps
  17. export PATH=\$PATH:${SERVICE_HOME}/local/go/bin:\$GOPATH/bin
  18. EOF
  19. $ sudo -i -u \"${SERVICE_USER}\"
  20. (${SERVICE_USER}) $ echo 'source $GO_ENV' >> ~/.profile
  21. (${SERVICE_USER}) $ mkdir ${SERVICE_HOME}/local
  22. (${SERVICE_USER}) $ wget --progress=bar -O \"${GO_TAR}\" \\
  23. \"${GO_PKG_URL}\"
  24. (${SERVICE_USER}) $ tar -C ${SERVICE_HOME}/local -xzf \"${GO_TAR}\"
  25. (${SERVICE_USER}) $ which go
  26. ${SERVICE_HOME}/local/go/bin/go
  27. .. END install go
  28. .. START install filtron
  29. .. tabs::
  30. .. group-tab:: bash
  31. .. code-block:: bash
  32. $ sudo -i -u \"${SERVICE_USER}\"
  33. (${SERVICE_USER}) $ go get -v -u github.com/asciimoo/filtron
  34. .. END install filtron