From 1022538f54d786e1bb96b5da3aa859597b5a5a9e Mon Sep 17 00:00:00 2001 From: Twentysix Date: Fri, 1 Apr 2016 00:16:23 +0200 Subject: [PATCH] Created Autorestarting (upstart) (markdown) --- Autorestarting-(upstart).md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Autorestarting-(upstart).md 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