Help with RCNG-style startup script.
Lewis Thompson
lewiz at fajita.org
Sun Sep 19 17:33:50 PDT 2004
Okay,
I am stumped by how to write a startup file for a python app and have it
work right. Basically I start the app with ``freevo start'' (I betcha
an't guess how to stop it?). There is no pidfile created (actually,
there is, but I have two other instances (freevo recordserver start,
freevo webserver start) that do not create pidfiles.
I mentioned these were run by python. If I grep some ps output we
get:
root 51905 0.0 4.0 18196 15356 p0 S 1:11AM 0:00.60 python -OO /usr/local/lib/python2.3/site-packages/freevo/helpers/recordserver.py
root 51912 0.0 3.0 14464 11596 p0 S 1:11AM 0:00.38 python -OO /usr/local/lib/python2.3/site-packages/freevo/helpers/webserver.py
root 51916 0.0 0.3 2108 1296 p0 I 1:11AM 0:00.03 xinit /usr/local/bin/freevo -force-fs -- :1
root 51924 0.0 0.9 4420 3560 p0 I 1:11AM 0:00.02 /usr/local/bin/python /usr/local/bin/freevo -force-fs
root 51927 0.0 9.3 37624 35444 p0 S 1:11AM 0:05.57 python -OO /usr/local/lib/python2.3/site-packages/freevo/main.py -force-fs
The first two are the record and web servers, respectively. The bottom
three are all part of the main one -- pid 51927. As you can see all are
python -OO ...py.
I've done my homework and read rc.subr(8). Basically I'm referring to
procname and interpreter. I assume that python is my interpreter and
procname is /usr/local/.../main.py (for the 51927 instances)?
Unfortunately the first line of main.py does not have #!python in any
form.
Does anybody know how to go about getting the pid of these processes
with the rc.subr-style scripts? I'm stuck and any help or hints would
be appreciated. Thanks!
-lewiz.
--
I was so much older then, I'm younger than that now. --Bob Dylan, 1964.
------------------------------------------------------------------------
-| msn:lewiz at fajita.org | jabber:lewiz at jabber.org | url:www.lewiz.org |-
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20040920/b2144c1e/attachment.bin
More information about the freebsd-ports
mailing list