Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Feb 11, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions docs/autostart_systemd.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,15 @@ Setting up auto-restart using systemd on Linux
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

Expand All @@ -24,7 +32,7 @@ Then create the new service file:

: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

Expand Down