In order to start ejabberd at boot and stop it properly at shutdown,
make sure rc.local and rc.local_shutdown contain the following lines:

  /etc/rc.d/rc.local
  ==================
  # Start ejabberd
  if [ -x /etc/rc.d/rc.ejabberd ]; then
    /etc/rc.d/rc.ejabberd  start
  fi

  /etc/rc.d/rc.local_shutdown
  ===========================
  # Stop ejabberd
  if [ -x /etc/rc.d/rc.ejabberd ]; then
    /etc/rc.d/rc.ejabberd stop
  fi
