diff --git a/Autorestarting-(upstart).md b/Autorestarting-(upstart).md new file mode 100644 index 0000000..20125a4 --- /dev/null +++ b/Autorestarting-(upstart).md @@ -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` \ No newline at end of file