Thanks Jan - this looks quite useful. The Fabric faq did mention
daemonizing the process to be detached and this gives me an easy way
to do that.
Pat
On 8/24/2011 11:20 PM, Jan Vlčinský (CAD) wrote:
Hi
I use it to turn my python scripts into services on Linux and
like the comfort of
- creation of start/stop/status/showrelog/restart script in
just a few lines
- direct command like "mydeamonizedscript start"
- interactive console to do all the actions
- option to check content of the running log file.
For your use case, I would check, what is returned result
code and set zdaemon so that it does not restart the script,
if it returns expected status code.
Jan
On 25 August 2011 05:31, pat flaherty <address@hidden>
wrote:
Hi,
I'm using fabric to populate eucalyptus instances in a
private cloud with company 'client' programs (that then
communicate back to my server) - and hopefully the last
thing fabric does before detaching is startup one of these
client programs. However it needs to leave the remote
client process detached and running as fab exits.
I'd solved an earlier fab detach process problem with
run('... command ...',pty=False)
for a tomcat app server and this worked fine.
This time I have to leave detached a 'grinder' agent
process:
http://grinder.sourceforge.net/index.html
The grinder is test automation software.
In particular this is the (grinder) command I want to issue
as the last statement in my fab routine before fab detaches
and exits:
java net.grinder.Grinder
you run this in a particular directory (use 'with cd' in
fabric) with files configged in certain and the agent/client
program attaches itself to the grinder console (remotely)
and you control the running of multiple agents of the same
kind from the grinder console.
Anyway, this process won't detach. pyt=False doesn't work
and I also tried the solutions from here:
http://fabric.readthedocs.org/en/latest/faq.html
which include pty=False in addition to such things as this:
run("nohup yes >& /dev/null < /dev/null &")
but so far, no luck.
Any ideas welcome.
Pat
_______________________________________________
Fab-user mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/fab-user
|