> I'm trying to run the Trac standalone server (tracd) using supervisor,

> > with Nginx as the frontend.  This is all working fine except that when
> > I try to restart Trac with "sudo supervisorctl restart trac", it
> > doesn't work.  It starts a new process, but the old one is not cleanly
> > killed, and therefore the new process fails because the port it needs
> > is blocked.
>
>
> http://supervisord.org/subprocess.html#nondaemonizing-of-subprocesses
>
> Make sure trac doesnt try to daemonize itself.  I don't know how to tell
> you how to do this, because I don't use Trac, but it's almost certainly
> possible.
>
> Thanks, I have it sorted now.  Although I did check this before, you had
the right idea. However it is not Trac itself that starts a daemon, but
that the bash shell will create a fork when running the tracd command.  To
stop this I just ran it using 'exec', and now it works.  So my
'trac_run.sh' now looks like this:

#!/bin/bash
. bin/activate
exec tracd --port=9000 --auth="*,/srv/users.htdigest,FGPS trac"
--env-parent-dir=/srv/trac

Cheers,
Robin
_______________________________________________
Supervisor-users mailing list
[email protected]
http://lists.supervisord.org/mailman/listinfo/supervisor-users

Reply via email to