Mike Orr wrote:
> I'm reviving this thread.
>
> Ken Garland wrote in another thread:
>   
>> Would like to hear an update on supervisord if you are able to get it up and 
>> running.
>>     
>
> The problem is the app won't start and there's no entry in the error
> logs as to why.  I'm wondering I can add some code to guess the reason
> -- or at least the specific point it fails -- and record it.  I'd also
> like to add a separate config argument for each environment variable
> (useful for workingenv configuration), make sure it opens the log file
> in append mode (Paster overwrites it :(), and writes a timestamp in
> the log when it starts the app (Paster doesn't do that either).
> Anybody feel like collaborating on this?
>
> Ian suggested writing a shell script that reliably starts the Pylons
> app, and then have supervisord run that.  
This is what I'm doing and it works great (except for stopping the 
service, because it only kills the shell script).

This is what i use:

#!/bin/bash

export PYTHONPATH=/projectdir
export PYTHON_EGG_CACHE=/home/username/.python-eggs
cd /projectdir
umask 0
/usr/local/python/bin/paster serve ktrack.ini
> I'm not sure that will help
> because one of the main weakness points is switching users and having
> the right permissions.  To run the shell script as supervisord would,
> I'd have to be root and make it switch to apache.  This means I'd have
> to put 'su' in the shell script or run it that way on the command
> line. 
I'm not sure what you mean, but my supervisord runs as root, and starts 
my pylons app as the user I setup in my supervisor.conf. I don't have to 
su or anything like that.

Hope that helps.

Huy
>  That means I would have to test the script as root, but more
> importantly, I'd be doing it differently than supervisord native
> user-switching works, which means I couldn't use that feature or test
> that portion.
>
>   


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to