dsmurl / the-system-controller-4

This is the working code of the System Conroller V4 designed for grass roots industrial systems management.
GNU Affero General Public License v3.0
2 stars 1 forks source link

SupervisordConfig: added supervisord config #39

Closed faisalraja closed 9 years ago

dsmurl commented 9 years ago

I'm excited to have the supervisor rolling. This is one of the advanced features I wanted. I'm not familiar with this enough to know when to merge it. Maybe a briefing on it or something.

faisalraja commented 9 years ago

Basically run this command to control the app.

to start it (it's important that this is ran in the project root)

supervisord -c supervisord.conf

to control it (stop supervisord)

supervisorctl shutdown

restart the webserver

supervisorctl restart all (or specific "restart syscontroller4")

you can reload config, restart supervisord etc use supervisorctl help for more commands

dsmurl commented 9 years ago

Cool. Does this run the process as the root level. I think the process needs the root level to get the pin readings. The pins on the BeagleBone are in the /dev folder and are virtual file descriptors owned by root only. I typically have to do something like

sudo python wsgi.py or sudo python wsgi.py & // to run in background

faisalraja commented 9 years ago

You'd have to run the supervisord -c supervisord.conf as root and everything it runs will be root unless specified in config.

dsmurl commented 9 years ago

cool. It would be nice to setup it up on boot. I'll look into it.

On Tue, Sep 1, 2015 at 2:12 PM, Faisal Raja notifications@github.com wrote:

You'd have to run the supervisord -c supervisord.conf as root and everything it runs will be root unless specified in config.

— Reply to this email directly or view it on GitHub https://github.com/dsmurl/DiySystemController4/pull/39#issuecomment-136831052 .

dsmurl commented 9 years ago

So you think this is ready to merge? I'll merge it now if it's complete and check into it's workings later.

faisalraja commented 9 years ago

If you run it successfully with that command it should be fine. You might have file path difference but I think the paths are common. You can check and run it on beaglebone.