The init.d script for the Openfire RPM has a bug: when it’s starting the service it doesn’t check if it’s already running, so it’s possible to start it twice and thus have problems with port numbers, etc.
Here I’m including a small patch for fixing this error. It just checks if the process is already running (by looking at the contents of the pidfile).
I have tested it only in Redhat SLC 4, but it should work in other distributions as well.
What about the situation where the machine crashes and the pid file exists without an associated process. stopping openfire will not remove the pid file in that situation.
I’ve applied the patch, extending the message in it in such a way that it instructs the user to remove the pid-file if the user is sure that no other Openfire is running.