I have written a ejabbed custom module but i am not able to install it According to ejabbed module doc we have to put module files in $HOME/.ejabberd-modules then use ejabberdctl module_check to check the module but i am getting error Error : not available
I guess your are following the instructions from https://docs.ejabberd.im/developer/extending-ejabberd/modules/#managing-your-own-modules
Did you create the spec file, as mentioned in this paragraph?
and creating a specification file in YAML format as mod_mysupermodule.spec (see examples from ejabberd-contrib). From that point you should see it as available module.