summaryrefslogtreecommitdiff
path: root/docs/utils/morty.sh.rst
blob: 3bdf9bdd3a49b65e7d192f2f3fa376df4df681c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
.. _morty: https://github.com/asciimoo/morty
.. _morty's README: https://github.com/asciimoo/morty
.. _Go: https://golang.org/

.. _morty.sh:

==================
``utils/morty.sh``
==================

.. sidebar:: further reading

   - :ref:`architecture`
   - :ref:`installation` (:ref:`nginx <installation nginx>` & :ref:`apache
     <installation apache>`)
   - :ref:`searx morty`

To simplify installation and maintenance of a morty_ instance you can use the
script :origin:`utils/morty.sh`.  In most cases you will install morty_ simply by
running the command:

.. code::  bash

   sudo -H ./utils/morty.sh install all

The script adds a ``${SERVICE_USER}`` (default:``morty``) and installs morty_
into this user account:

#. Create a separated user account (``morty``).
#. Download and install Go_ binary in user's $HOME (``~morty``).
#. Install morty_ with the package management from Go_ (``go get -v -u
   github.com/asciimoo/morty``)
#. Setup a systemd service unit :origin:`[ref]
   <utils/templates/lib/systemd/system/morty.service>`
   (``/lib/systemd/system/morty.service``).

.. hint::

   To add morty to your searx instance read chapter :ref:`searx morty`.

Create user
===========

.. kernel-include:: $DOCS_BUILD/includes/morty.rst
   :start-after: START create user
   :end-before: END create user


Install go
==========

.. kernel-include:: $DOCS_BUILD/includes/morty.rst
   :start-after: START install go
   :end-before: END install go


Install morty
=============

Install morty software and systemd unit:

.. kernel-include:: $DOCS_BUILD/includes/morty.rst
   :start-after: START install morty
   :end-before: END install morty

.. kernel-include:: $DOCS_BUILD/includes/morty.rst
   :start-after: START install systemd unit
   :end-before: END install systemd unit

.. _morty.sh overview:

Overview
========

The ``--help`` output of the script is largely self-explanatory
(:ref:`toolboxing common`):

.. program-output:: ../utils/morty.sh --help