[ejabberd] help with the start and stop of a ejabber server

Alexey Shchepin alexey at sevcom.net
Sat May 28 03:28:19 MSD 2005


Hello, Felipe!

On Fri, 27 May 2005 11:19:41 -0300, you said:

 FBV> Hello.  I have done here a shell script (it is attached for those who
 FBV> want to use it too) to start, stop, restart and status of my service. A
 FBV> good thing is to put it at /etc/init.d on a suse system and then you can
 FBV> start and stop it using yast and runlevel editor. So, you can tell to the
 FBV> system this service should start at boot time or not.

 FBV> I renamed it to rcejabberd. But you can put the ejabberd at /etc/init.d
 FBV> to see a service named ejabberd in runlevel editor. Then you can symlink
 FBV> it at /usr/sbin/rcejabberd to have the behavior of a suse system.

 FBV> You can type rcejabberd start | stop | restart | status

 FBV> Start execute the comand below.

 FBV> The problem is with the STOP behavior. Here I look for every erlang
 FBV> process and get their PIDs and then kill them.

 FBV> Here -> erlang=$(ps ax | grep -i erlang | grep -v grep | awk '{print
 FBV> $1}')

 FBV> So, I want to improve this behavior to a more smoothly one. :)

Killing ejabberd is an easy way to damage its database :)

ejabberdctl command provides stop, restart, and status commands, so better to
use it instead.  Also you can take a look at ejabberd/examples/mtr/ejabberd for
example of NetBSD init script, or Debian ejabberd package and FreeBSD ejabberd
port for another examples.


More information about the ejabberd mailing list