daemon stop problem
i.zaufi at gmail.com
Tue Nov 30 11:37:12 GMT 2010
I've got a problem when trying to write an upstart script for my
here is the script:
---[start of /etc/init/indexer.conf]---
description "Indexer Daemon"
#start on runlevel 
#stop on runlevel [!2345]
# Make sure DB path exists...
if [ -r /etc/opt/entell/indexer.conf ]; then
db=`cat /etc/opt/entell/indexer.conf | grep xdb | sed
's,^\s*xdb\s*=\s*\(.*\)$,\1,' | head -n 1`
mkdir -p `dirname $db`
exec /opt/entell/bin/indexer -d
---[end of /etc/init/indexer.conf]---
being running from command line w/ -d option it works fine and
shutdowns Ok after `kill`. but when I try to `stop indexer` it hangs
(according strace on poll() some descriptor).
note that indexer is a real daemon (i.e. it fork() twice as 'expect'
stanza supposed) but NO SIGTERM is delivered to it... :(
another one thing I've noticed: after `start` some PID is displayed,
but real PID, of cause, is greater... -- dunno is it important or
I can provide any aux info if required... I have no idea whats going
on :( -- as for me, it looks like upstart remember a wrong PID for my
More information about the upstart-devel