mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
Add autostart documentation for venv users (#3028)
* Add documentation for venv users Resolves #3005 * Add changes to changelog.d * Use "redenv" over "path/to/venv"
This commit is contained in:
parent
7e9b1b87e6
commit
e79a08e392
1
changelog.d/3005.docs.rst
Normal file
1
changelog.d/3005.docs.rst
Normal file
@ -0,0 +1 @@
|
||||
Adds autostart documentation for Red users who installed it inside a virtual environment.
|
||||
@ -8,11 +8,23 @@ Setting up auto-restart using systemd on Linux
|
||||
Creating the service file
|
||||
-------------------------
|
||||
|
||||
Create the new service file:
|
||||
In order to create the service file, you will first need the location of your :code:`redbot` binary.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# If redbot is installed in a virtualenv
|
||||
source redenv/bin/activate
|
||||
|
||||
# If you are using pyenv
|
||||
pyenv shell <name>
|
||||
|
||||
which redbot
|
||||
|
||||
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 your bot is running under (hopefully not root):
|
||||
Paste the following and replace all instances of :code:`username` with the username, and :code:`path` with the location you obtained above:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
@ -21,7 +33,7 @@ Paste the following and replace all instances of :code:`username` with the usern
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/home/username/.local/bin/redbot %I --no-prompt
|
||||
ExecStart=path %I --no-prompt
|
||||
User=username
|
||||
Group=username
|
||||
Type=idle
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user