From da3f86d6ba5496fa3d9b769c1a57f4777ca4e6a5 Mon Sep 17 00:00:00 2001 From: zephyrkul Date: Tue, 11 Feb 2020 11:11:36 -0700 Subject: [PATCH] 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 --- docs/autostart_systemd.rst | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/autostart_systemd.rst b/docs/autostart_systemd.rst index 168c06d66..8976bb358 100644 --- a/docs/autostart_systemd.rst +++ b/docs/autostart_systemd.rst @@ -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 @@ -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