From 54711b2054e28e9c7d4334645e6cda8c744c3d04 Mon Sep 17 00:00:00 2001 From: jack1142 <6032823+jack1142@users.noreply.github.com> Date: Sun, 12 Jan 2020 23:41:29 +0100 Subject: [PATCH] [Docs] Update autostart guides to use `-O` flag (#3354) * Update autostart_systemd.rst * Update autostart_pm2.rst --- docs/autostart_pm2.rst | 12 +++++++----- docs/autostart_systemd.rst | 4 ++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/docs/autostart_pm2.rst b/docs/autostart_pm2.rst index b7e28e38d..27300ec3b 100644 --- a/docs/autostart_pm2.rst +++ b/docs/autostart_pm2.rst @@ -17,18 +17,20 @@ Start by installing Node.JS and NPM via your favorite package distributor. From After PM2 is installed, run the following command to enable your Red instance to be managed by PM2. Replace the brackets with the required information. You can add additional Red based arguments after the instance, such as :code:`--dev`. -:code:`pm2 start redbot --name "" --interpreter "" -- --no-prompt` +.. code-block:: none + + pm2 start redbot --name "" --interpreter "" --interpreter-args "-O" -- --no-prompt .. code-block:: none Arguments to replace. - --name "" + A name to identify the bot within pm2, this is not your Red instance. - --interpreter "" - The location of your Python interpreter, to find out where that is use the following command: - which python3.6 + + The location of your Python interpreter, to find out where that is use the following command inside activated venv: + which python The name of your Red instance. diff --git a/docs/autostart_systemd.rst b/docs/autostart_systemd.rst index 29d404c44..06d5b141a 100644 --- a/docs/autostart_systemd.rst +++ b/docs/autostart_systemd.rst @@ -18,7 +18,7 @@ In order to create the service file, you will first need the location of your :c # If you are using pyenv pyenv shell - which redbot + which python Then create the new service file: @@ -33,7 +33,7 @@ Paste the following and replace all instances of :code:`username` with the usern After=multi-user.target [Service] - ExecStart=path %I --no-prompt + ExecStart=path -O -m redbot %I --no-prompt User=username Group=username Type=idle