fghack
(which doesn't work) and --console
(which isn't what is wanted).
However, peering into the source code to see if I could prevent it from backgrounding, I found just what I wanted: the undocumented
--nodetach
switch. Well, it has some documentation; there is a changelog entry that calls it a debug switch, which it isn't. Shame on you Sphinx-team!
Anyway, here is my daemontools
run
script:
#!/bin/bash
config=/opt/sphinx/etc/sphinx.cfg
servicename=sphinx
echo $(date "+%Y/%m/%d %H:%M:%S") $$ Sphinx searchd
exec setuidgid dw \
/opt/sphinx/bin/searchd --config $config --nodetach 2>&1 \
| /usr/bin/logger -p info -t $servicename
BTW, I have RPMs of Percona-Server (aka MySQL with a bunch of good patches) with SphinxSE.
No comments:
Post a Comment