Configure and install supervisord
https://www.digitalocean.com/community/tutorials/how-to-install-and-manage-supervisor-on-ubuntu-and-debian-vps http://supervisord.org/configuration.html https://github.com/strongloop/node-foreman
easy_install supervisor
echo_supervisord_conf > /etc/supervisord.conf
supervisord -c /etc/supervisord.conf
echo -e "\n[include]\nfiles = /etc/supervisor/conf.d/*" > /etc/supervisord.conf
mkdir -p /etc/supervisor/conf.d/
supervisorctl reload
supervisorctl reread
Add suppervisord init script, to start on boot:
curl https://raw.githubusercontent.com/Supervisor/initscripts/master/redhat-init-mingalevme > /etc/rc.d/init.d/supervisord
chmod 755 /etc/rc.d/init.d/supervisord
chkconfig --add supervisord
chkconfig --list supervisord
chkconfig supervisord on
service supervisord start
I also had to add this to the init script: . /etc/bashrc
.
Use this to manage the init service:
service supervisord stop
service supervisord status
service supervisord restart
supervisorctl start 'cors:*'
supervisorctl update
Restarts apps whose configurations has changed. http://www.onurguzel.com/supervisord-restarting-and-reloading/
why on earth would you do this...
supervisord.conf is located in etc with every single other conf file God has ever thought of.
RedHat and Fedora and CentOS, as well as most of Linux has taken that deep dive off the cliff into systemd, you should learn it.