[JDEV] Jabberd pidfile handling.
kadokev at msg.net
kadokev at msg.net
Fri Mar 23 20:45:03 CST 2001
-- Start of PGP signed section.
> The pidfile mess is mostly my thought. Someone requested the feature last
> minute and I put it in =). If you don't want pidfile support though, you
> should be able to remove the tag and function correctly. It should be
> cleaned up in the future.
Thanks.
I like the fact that jabberd creates a pidfile, as I can use it for my
startup scripts (see below) to cleanly restart the server. The difficulty
is in the refusal to start up if a pidfile exists, even though the PID in
the file is dead.
I use the 'multiple.xml' concept to start each transport in a separate
process, and I specify a distinct pidfile for each in their own .xml file.
Kevin
> On Wed, Mar 14, 2001 at 05:34:00PM -0600, kadokev at msg.net wrote:
> > I understand that 'jabberd' checks for the existence of the pidfile, and
> > refuses to run if it exists. This works fine as long as the previous
> > execution of jabberd exited cleanly and removed it's old pidfile.
> >
> > Was there an intentional design decision made not to read the process ID
> > stored in the pidfile, and if that process no longer exists, to overwrite
> > the pidfile with the new process ID rather than exit with an error?
> >
> > I've worked around this by doing basically the same thing in my jabber
> > startup script.
> >
> > Kevin
$ cat /etc/service/jabber/run
#!/bin/sh
#
# Jabber start script for 'daemontools' operation.
#
# For information on Daemontoos: http://cr.yp.to/daemontools.html
#
cd /usr/local/jabber-1.4
su jabber -c "kill `cat ./spool/jabber.pid` ; rm ./spool/jabber.pid"
su jabber -c "touch ./spool/run.log"
exec setuidgid jabber jabberd/jabberd >> ./spool/run.log 2>&1
###EOF###
More information about the JDev
mailing list