1

I am trying to add the mod_zeropush module to the existing ejabberd MongooseIm server.

I copied the beam file to location where all beam files are there in the rel folder.

When do the $sudo bin/mongooseimctl debug command and finding the mod_ all entries matching with mod_... I see all except my mod_zeropush.

Can anyone help me how they made this module add to their chat server.

Raised this issue to Github guys as well : MongooseIM GitHub

codelover
  • 1,113
  • 10
  • 28

1 Answers1

1

I achieved this by getting some help and would like share how its added to MongooseIM.

This setup is done on a server running Ubuntu 16.04.

  1. After you downloaded mod_zeropush.erl (maybe from here), put it in the location as mentioned below:

    `<GitSourceMongooseFolder>/apps/ejabberd/src/mod_zeropush.erl`
    
  2. Run sudo make in MongooseIM directory.
  3. After the build is done, the beam file is created in the rel folder at location given below:

    /MongooseIM/rel/mongooseim/lib/ejabberd-2.1.8+mim-2.0.0beta2-312-g3cec442/ebin

  4. Add the following code to ejabberd.cfg in modules section.

     {mod_zeropush, [
        {sound, "default"},
        {auth_token, "myapp-chat-token"},
        {post_url, "http://my.url/mypath"}
      ]},
    
  5. Go to rel/mongooseim folder and enter the command sudo bin/mongooseimctl debug
  6. Check by entering mod_ on shell prompt then Tab; you should see mod_zero
  7. Go to root/rel github directory and sudo bin/mongooseim restart

Done. You should receive offline messages on your web server.

Ali Momen Sani
  • 840
  • 2
  • 11
  • 26
codelover
  • 1,113
  • 10
  • 28