#!/bin/bash


# First, install supervisor. Don't install through your package manager because those packages are unupdated!

sudo apt-get install python-setuptools python-pip curl
easy_install supervisor

# Use pip too
pip install supervisor

# Make a default config file...
sudo echo_supervisord_conf > /etc/supervisord.conf

# Get the init.d
sudo curl https://gist.github.com/Liamraystanley/8628649/raw/e7056f2e717cee13fa3d3cd2b564e95d193a7efb/supervisord > /etc/init.d/supervisord
sudo chmod +x /etc/init.d/supervisord

# Then... simply add it to system boot
sudo update-rc.d supervisord defaults

# And start up
service supervisord start
