Python as RedHat/SysV service

Stuart D. Gathman stuart at bmsi.com
Wed Dec 19 11:04:41 EST 2001


On Tue, 18 Dec 2001 16:59:37 -0500, Donn Cave wrote:

> Quoth "Stuart D. Gathman" <stuart at bmsi.com>: 
>> I have a system service written in python.  On RedHat systems, this
>> service is conveniently installed and started by placing a script in
>> /etc/rc.d/init.d to start,stop,reload, etc the service. 

> As you noticed, that "standard method" isn't a very good one!  What
> about other services that run under their own name but fork, like sshd?

It occurs to me that the init.d scripts can be python scripts just as easily
as shell scripts.  If the service is written in Python, this guarrantees
that python is available to run the script also.  However, it seems that
the shell methods are somewhat lacking, so it could be useful for other
services as well.

I will try to make a general purpose Python based init.d module - any
recommendations are welcome (especially if it has already been done).

I will call the python module with service interface functions 'service.py'.



More information about the Python-list mailing list