Ejabberd how to compile a new module

Here I found the code:

erlc -I ~/ejabberd-2.1.13/lib/ejabberd-2.1.13/include -pa ~/ejabberd-2.1.13/lib/ejabberd-2.1.13/ebin   mod_my.erl 

But that didn't work?

-2
source share
3 answers

Below are the steps to add a custom module to ejabberd

  • put your module in the ejabberd / src folder.
  • go to the ejabberd directory in the terminal and run the command $ sudo make
  • it will show you that your module is compiled. Now run $ sudo make install
  • Add your module to the configuration file in /etc/ejabberd/ejabberd.yml
  • restart ejabberd and your user module will start.
+4
source

Just release the module in the ejabberd src folder / then "make". Nothing special needed to compile it.

+2
source

, Ejabberd

1) , (. -   https://github.com/processone/ejabberd-contrib).


      │
      │───conf
      │ └───modulename.yml
      │───src
      │ └───modulename.erl
      │───README.txt
      │───COPYING
      │───modulename.spec

2) ejabberd ( eTRab_MODULES_PATH ejabberdctl.cfg).

3) ejabberdctl modules_available,

4) ejabberdctl module_install _

https://docs.ejabberd.im/developer/extending-ejabberd/modules/

+2
source

Source: https://habr.com/ru/post/1694738/


All Articles