[Twisted-Python] Managing twisted application as init service.

Maxim Lacrima lacrima.maxim at gmail.com
Mon Oct 22 11:00:02 EDT 2012


I have been developing an application, which I would like to manage in a
fashion similar to scripts placed in /etc/init.d. I.e. I want to start,
stop, restart and monitor the application.

Currently, I am trying to figure out a correct approach for this. Initially
I thought to create a wrapper shell script like here [1] and just copy it
into `/etc/init.d` directory. Then in that script I would make `twistd`
start the application.

However, today I discovered `twisted.runner` package,  which seems to do
the same thing.  So my question is how to run and monitor processes
using `twisted.runner`? I couldn't find any examples on how to use it.

Also, in 11th part of the tutorial [2] there is a mention that I can
package my application as rpm package, which, when installed, will
correctly register my package as `init.d` script.

So are there best practices in twisted about how to install twisted
applications and manage them as `init.d` services?

I am quite new to Twisted (and to Linux `init.d` scripts). Sorry, if my
question is unclear.

Thank you in advance.

[1] http://www.sensi.org/~alec/unix/redhat/sysvinit.html

with regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20121022/022f9618/attachment.htm 

More information about the Twisted-Python mailing list