From c04c2efefffb73dd3a3bed09a7ac99c32beca682 Mon Sep 17 00:00:00 2001 From: Obi-Wan3 <44986166+Obi-Wan3@users.noreply.github.com> Date: Wed, 12 May 2021 10:59:54 -0700 Subject: [PATCH] [Docs] updates to the Linux and Mac auto-restart docs (#5020) * [Docs] add `sudo systemctl disable` to Linux auto-restart docs * [Docs] fix typo in Linux auto-restart docs * [Docs] update Mac auto-restart docs * [Docs] implement suggestions for Linux auto-restart docs Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com> * [Docs] update wording on Mac auto-restart docs * [Docs] fix grammar in Linux auto-restart docs Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com> --- docs/autostart_mac.rst | 41 +++++++++++++++++++++++++++++--------- docs/autostart_systemd.rst | 8 +++++++- 2 files changed, 39 insertions(+), 10 deletions(-) diff --git a/docs/autostart_mac.rst b/docs/autostart_mac.rst index f8207a8eb..32978a37c 100644 --- a/docs/autostart_mac.rst +++ b/docs/autostart_mac.rst @@ -66,21 +66,44 @@ Paste the following and replace the following: .. note:: - Should you need to view the output from Red (for example: to find error messages that - are output to the console to help with support), you can run :code:`nano /tmp/red_out.log` - and :code:`nano /tmp/red_err.log` to do so + Should you need to set up auto-restart for additional bots, create a :code:`.plist` file for + each bot under a different file name, and use the respective file names for the commands below. Save and exit :code:`ctrl + O; enter; ctrl + x` ------------------ -Loading the plist ------------------ +------------------------------- +Starting and loading the plist +------------------------------- -Run the following: +To start the bot and set it to start on boot, you must run the following command: -:code:`sudo launchctl load /Library/LaunchDaemons/red.plist` +.. prompt:: bash + + sudo launchctl load -w /Library/LaunchDaemons/red.plist If you need to shutdown the bot, you can use the ``[p]shutdown`` command or type the following command in the terminal: -:code:`sudo launchctl stop red` \ No newline at end of file +.. prompt:: bash + + sudo launchctl stop red + +To start the bot again after a shutdown, run the following: + +.. prompt:: bash + + sudo launchctl start red + +To stop the bot and set it to not start on boot anymore, run the following: + +.. prompt:: bash + + sudo launchctl unload -w /Library/LaunchDaemons/red.plist + +To view Red's log, run the following (:code:`red_out.log` is for the console output, and +:code:`red_err.log` for the error logs): + +.. prompt:: bash + + nano /tmp/red_out.log + nano /tmp/red_err.log diff --git a/docs/autostart_systemd.rst b/docs/autostart_systemd.rst index d96ac5325..7e9ff8379 100644 --- a/docs/autostart_systemd.rst +++ b/docs/autostart_systemd.rst @@ -89,7 +89,13 @@ type the following command in the terminal, still by adding the instance name af .. warning:: If the service doesn't stop in the next 10 seconds, the process is killed. Check your logs to know the cause of the error that prevents the shutdown. -To view Red’s log, you can acccess through journalctl: +To set the bot to not start on boot anymore, you must disable the service by running the following command, adding the instance name after the **@**: + +.. prompt:: bash + + sudo systemctl disable red@instancename + +You can access Red's log through journalctl: .. prompt:: bash