Make systemd guide clearer on obtaining username and python path (#3537)

* [docs] make username clearer

* make systemd docs even more clear

* fix first code block
This commit is contained in:
zephyrkul 2020-02-11 11:11:36 -07:00 committed by GitHub
parent 26fdbf63ee
commit da3f86d6ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,7 +8,15 @@ Setting up auto-restart using systemd on Linux
Creating the service file Creating the service file
------------------------- -------------------------
In order to create the service file, you will first need the location of your :code:`redbot` binary. In order to create the service file, you will first need to know two things, your Linux :code:`username` and your Python :code:`path`
First, your Linux :code:`username` can be fetched with the following command:
.. code-block:: bash
whoami
Next, your python :code:`path` can be fetched with the following commands:
.. code-block:: bash .. code-block:: bash
@ -24,7 +32,7 @@ Then create the new service file:
:code:`sudo -e /etc/systemd/system/red@.service` :code:`sudo -e /etc/systemd/system/red@.service`
Paste the following and replace all instances of :code:`username` with the username, and :code:`path` with the location you obtained above: Paste the following in the file, and replace all instances of :code:`username` with the Linux username you retrieved above, and :code:`path` with the python path you retrieved above.
.. code-block:: none .. code-block:: none