Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

rc.d - no support for python scripts



Hi!

I wanted to run a python service using an rc.d script. It knows to write a pid file, but that is not good enough for our rc.d system. It complains:

# /etc/rc.d/syncserver stop                                                                                                                  
syncserver not running? (check /home/wiz/Projects/syncserver/syncserver.pid).

I think this happens because the executable is not called “syncserver” but is started using a python2.7 binary. So I tried setting

command_interpreter="/home/wiz/Projects/syncserver/local/bin/python2.7"

but then I got

/etc/rc.d/syncserver: WARNING: $command_interpreter /home/wiz/Projects/syncserver/local/bin/python2.7 != /bin/sh

Is there a way to get python programs running nicely with rc.d and pid support (i.e. “status” and “stop” support)?

 Thomas






Home | Main Index | Thread Index | Old Index