mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-07 09:52:30 -05:00
Created Autorestarting (upstart) (markdown)
22
Autorestarting-(upstart).md
Normal file
22
Autorestarting-(upstart).md
Normal file
@@ -0,0 +1,22 @@
|
||||
How to make it auto restart in case of crash, using Upstart. This guide assumes you used the Linux guide to install Red.
|
||||
|
||||
`sudo nano /etc/init/red.conf`
|
||||
|
||||
Paste this script
|
||||
```
|
||||
start on runlevel [2345]
|
||||
stop on runlevel [016]
|
||||
|
||||
respawn
|
||||
chdir /home/ubuntu/Red-DiscordBot
|
||||
setuid ubuntu
|
||||
setgid ubuntu
|
||||
exec python3.5 red.py --no-prompt
|
||||
```
|
||||
Save with CTRL+O.
|
||||
You can now start Red using
|
||||
`sudo start red`
|
||||
|
||||
Other available commands:
|
||||
`sudo stop red`
|
||||
`sudo restart red`
|
||||
Reference in New Issue
Block a user